Introduction

Today we are going to learn how we can receive an email notification on files uploading to the S3 bucket in AWS.

S3 Bucket

S3 Stands for Simple Storage Service and it is a cloud storage service available in AWS. Basically, S3 in Amazon has two entities, objects, and buckets. Objects are stored inside buckets and every organization needs a file system to store their unstructured files, that's why AWS introduced a file system called S3. In my last article, we already learned how to create and access an S3 bucket here

In this, we are using the AWS SNS(Simple Notification Service) that enables you to set up, operate, and send the notifications from the cloud directly to the customer so here we notify the customer via email when files are uploaded to the S3 bucket

Setting up SNS

Step 1 - Create an SNS Topic

Email Notification On Uploading files to S3 Bucket

Copy the Topic ARN for the next task

Step 2 - Subscribe to an SNS topic

Email Notification On Uploading files to S3 Bucket

After this, you will receive a confirmation subscription email where you need to confirm the subscription if you do not confirm this your subscription is in a pending state.

Step 3 - Create an event

Now create an event for which s3 bucket you want to receive the notifications

Email Notification On Uploading files to S3 Bucket

Try to upload a file to the bucket -

Email Notification On Uploading files to S3 Bucket

Email Notification On Uploading files to S3 Bucket

Summary

In this way, we can create a notification alert while files are uploaded to S3 Bucket and you can customize your alerts according to your requirements.

I hope you like this article. Stay safe and learn more!