Trust that it works...
Code attached in pull request. We implemted both with Java as well as JavaScript. This lambda takes in JSON data at an API gateway endpoint and adds the phone number to the SNS topic.
A lambda function automatically fires on database updates. If the task status has reached "Finished", the lambda sends a message to the SNS topic which sends a text to all subscribers with the task name that was completed.
We created a JavaScript Lambda that would broadcast out a message to all subscribers. The code for this lambda is also included in our pull request.
Run the ProducerTest at /test/java/javaMessageQueues/ProducerTest ***This will run infinitely until you manually stop the test
AWS Docs AWS Docs Add A Subscriber Resource Add A Subscriber Resource
Chris Coulon Marisha Hoza