From the course: AWS Quick Tips for Developers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Creating an SNS event with S3

Creating an SNS event with S3

- [Instructor] The simple notification service allows for AWS services to publish to an SNS topic and then that topic can trigger subscribing services. Let's look at creating a topic to kick off Lambda when a fall is added to a bucket. So I'm going to click create topic and I'm going to name it kicker for Lambda kicker, and we have to change the access policy to allow anyone to publish to this topic. That updates our JSON permissions here with the principle of asterisk. Then I'm going to create the topic. Once it's created, I can subscribe to it for my Lambda. I just have a simple Lambda here. I'm going to add the trigger, and from the dropdown, select SNS and it already has our kicker topic there so I'll just add that, and then from our bucket, we need to be able to publish, so I'm going to go to my properties, scroll down to events, add a notification, give it a name like new file, set put for the events and tell it to send to an SNS topic and we'll pick our kicker so I can save…

Contents