AWS S3 Bucket, Lambda Function with Simple Notification Service (SNS)

Описание к видео AWS S3 Bucket, Lambda Function with Simple Notification Service (SNS)

Git Hub: https://github.com/shankysharma86/aws...

GOAL: Upload/update/deletion Events into S3 bucket will trigger an AWS Lambda function. Lambda function will then fetch the file details and trigger AWS SNS Topic to send an Email notification to the stakeholders/subscribers with the file details and contents.

USE CASE: Just an Example
Organization’s critical documents such as contracts & policies are being managed onto S3 bucket and any change to the files in bucket should trigger an automated email to stakeholders/departments as an information/action.
For demo, json file will be considered.

#AWS #S3 #Lambda #SNS #S3Bucket #AWSLambda #SimpleNotificationService #Shashank #ShashankSharmaDevOps #ShashankSharma #S3LambdaSNS #DevOps #Automation #Cloud #Quickwin #QuickApplauds #ShortVideo

hello everyone thanks for joinhello everyone thanks for joining today
we are going to see the AWS
implementation we will create a lambda
function that will capture events from
s3 bucket and then lambda function will
trigger this SNS topics to send emails
to the subscribers go for the day is
that upload update our deletion events
on to the s3 bucket should trigger a WS
lambda function further lambda function
will fetch the file details and trigger
a WS SNS topic to send an email
notification to the stakeholders or
subscribers with the required file
details and contents one of the possible
use case could be that organizations
critical documents if those are stored
on to s3 buckets such as contracts and
policies then businesses may want to
update the stake holders or departments
such as legal department or support
center that some changes has been made
into the contracts and policies
documents and those changes are now
available onto s3 bucket the only
prerequisite is a person should have AWS
account this is our high-level design
wherein we trigger the events from s3
our lambda function will capture the
event and then pass it on to Amazon SNS
which is going to trigger emails to the
stakeholders our game plan is that we
first create s3 bucket will create SNS
subscription and confirm the email
subscription create a policy and role
and that role will attach to the lambda
function which will create as a step 4
and then resources to create a policy
and the lambda function code in Python
language that is available on to my
github repository I'll also place this
into the description of this video
all right so once you are into it
yes management console we can look for
the service as three and inside Amazon
s3 we will create a pipette will provide
the bucket name as 3 lambda demo one
thing to remember is that bucket names
are unique globally so if you are
planning to use the exactly same bucket
name it might not work so try to append
it with your name for now I'll just keep
s3 - lambda demo because it looks like
it is available I'll select the region
as not Virginia but for yourself please
feel free to select your preferred
region we'll keep everything else as is
to maintain the simplicity and we create
a bucket great so our bucket is not
created with named s3 - lambda demo the
next step is to create SNS and then
subscription and then we have to confirm
the email subscription so we go to
services we'll look for simple
notification service SNS here we are at
SNS dashboard to create a topic I'll
select topics and then create topic the
name of the topic will keep topic -
lambda demo and rest everything will
keep as is for the simplicity and we'll
create a topic ok the topic is created
we can take a note of Erin or you can
come later to copy this then we'll
create a subscriptions
our topic a RN is already populated here
so we will just go ahead and select the
protocol which is going to be email in
our case and then the endpoint is going
to be the email address onto which we
want to receive emails we keep
everything else as is and create the
subscription now when we create the
subscription your personal email ID
which you have entered is going to
receive AWS notifications of description
confirmation email which you have to
open and confirm the subscription to
create a policy in AWS I have made few
resources our direct URL for this github
repository is available into the
description please use that URL and hit
that into your browser then go to the
policy JSON file over here for granting
access to write logs and then we are
granting that object for the s3 bucket
and then published rights for SNS topic
that we have created from line number 27
to 30 we have to make few changes into
the JSON file before we will create a
policy out of it we have to replace
these numbers including the brackets we
have to replace this with our AWS
account number and then we have to
replace this entire bracket with the s3
bucket name that we have created for
demonstration

Комментарии

Информация по комментариям в разработке