The events could be
S3 object : removed , created, restore, replication
object name filtering possible (*.txt)
s3 deliver events in seconds but sometimes take a minutes
you can send to sns sqs or lambda
we need AI Permissions for :
SNS policy
SQS resource access policy
lambda function
Amazon event bridge rules you can sed events to 18 aws service destination
json rues for advance filtering
multiple destinations
event bridge capabilities
Example :
if you want to create a event notification, you need to go to tab Properties of your bucket :
then scroll down and click on create event notification
then we have a window with the event notification option we can put the name of the event notification
the prefix of objects that we want to notify
and a suffix of objects like .txt , .jpg .exe .sh
we will choose the even type of object creation like :
All object create event like put, post, copy ….
for destination of our events we will choose SQS queue but first we need to create a SQS queue
then we go to Simple Queue Service to create a queue
we put a name of the queue
then we click on Create queue
after that we go to the tab Access policy and click on edit
then go to Access policy section, click on Policy generator
in principal we put *, in actions we select sendmessage, on ARN we put our queue’s ARN that we just create, after that we click on Generate Policy
we copy the policy generator to our Access policy section of our SQS queue
after create the queue we go back to bucket section than we left the last time and select the queue
we upload a file in our bucket
then we go to our SQS queue to see the notification
we see the message in our queue, we have to go to SQS queue click on send and receive messages
go to receive messages section ant then click on pull for messages
click on stop polling then you click on the link of the message and see the name of your file
Links :
Leave a Reply
You must be logged in to post a comment.