- Language:
- Python
- Framework:
- AWS SAM
Download this pattern (.zip)
View this pattern on GitHub

Clone repo
git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/s3-sns
Deploy
sam deploy --guided
Testing
1. Go to the SNS Console and select the topic that was created after running sam deploy.
2. Click on Create Subscription.
3. Under Protocol, select the type of endpoint to subscribe to (email, SMS, etc.)
4. Confirm the message subscription.
5. Upload an object to the S3 bucket you created.
6. Check your notifications.
Cleanup
1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"