Our's a real-estate client who stores Property record's image in AWS. As the user uploads photo in AWS, we need to identify the Property record based on the Image name and update its field in Salesforce. I believe Platform Event suits better for this use-case. Some of my colleagues say it's better to use custom REST service.

Can anyone help us to point out which solution would work well or seems appropriate?

  • 2
    I had a similar dilemma. You can see it here. salesforce.stackexchange.com/questions/228160/… Aug 10, 2018 at 8:58
  • @PranayJaiswal Looking at the answer, I'll kind of feel custom REST is the way forward.
    – Praveen
    Aug 10, 2018 at 9:51
  • We solved this problem the opposite way: the users upload images in Salesforce, and behind the scenes they end up in S3. It might be easier for you to go that route, if possible.
    – sfdcfox
    Aug 10, 2018 at 14:03
  • @sfdcfox For some reason, the client does not want to store the image in Salesforce might be due to the Storage cost. So the suggested approach will not work for them.
    – Praveen
    Aug 10, 2018 at 16:04
  • @Praveen We don't store the images in Salesforce; all we store is a URL to the images in S3. It just so happens that the users are expected to log in to Salesforce first and upload the files.
    – sfdcfox
    Aug 10, 2018 at 16:06

1 Answer 1


Well, at the end of the day, one of the advantages of using events is the asynchronous communications. In this case, you would have to leverage if you need your system to be sync or async.

Another of the great advantages of using an event-driven architecture is that multiple subscribers can subscribe to the publisher while being completely decoupled.

From the requirements you have stated, I would assume you would want it synchronous since if the field in Salesforce is not updated, you might want to do something about it. In that case, a REST service is the best option imo.

Regarding the second point, it also looks like it's going to be a 1:1 integration, so again, I would go with a REST service. On the other hand, if you think down the road it's possible to have multiple subscribers, then using Platform Events might be a very valid option.

In any case, any solution could be valid depending on all the different requirements. Those two points are the most important ones that I could think of in order to decide, but there may be more which would make the balance drop to one side or another.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .