Introduction
Amazon S3 event notifications can publish event notifications when certain events occur in your bucket creating a notification configuration, for example, via Amazon SNS, Amazon SQS, or AWS Lambda. For instance, when a new object is uploaded in your bucket, Amazon S3 will send notifications to AWS Lambda and the event starts Lambda to process code as a Lambda function so that you can invoke a notification to your e-mail address or your mobile devices using an SNS topic. The point is, you do not need to implement your own system to monitor and notify events in order to detect changes of events because AWS Lambda automatically scales according to the rate of events. AWS Lambda also supports the use of its own custom code referred to as the Lambda function (λ) zipping and uploading your code to AWS Lambda.
The following screenshot shows a common application process of S3 event notifications with SNS topics, SQS queues, and Lambda functions:
First, we will be creating an SNS...