The SNS notification service can be used across multiple use cases, one of which involves triggering Lambda functions. The SNS trigger is popularly used as an interface between the AWS CloudWatch service and Lambda.
So, in this section, we will do the following:
- Create an SNS topic
- Create a CloudWatch alarm for our receiver-bucket bucket to monitor the number of objects in the bucket
- Once the objects count reaches 5, the alarm will be set to ALERT and the corresponding notification will be sent to the SNS topic that we have just created
- This SNS topic will then trigger a Lambda function, which prints out a Hello World message for us
This will help you understand how to monitor different AWS services and set up alarms for some ...