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
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-20-1024x258.png)
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
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-21.png)
we will choose the even type of object creation like :
All object create event like put, post, copy ….
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-22.png)
for destination of our events we will choose SQS queue but first we need to create a SQS queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-23.png)
then we go to Simple Queue Service to create a queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-24.png)
we put a name of the queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-25-1024x467.png)
then we click on Create queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-26.png)
after that we go to the tab Access policy and click on edit
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-27-1024x391.png)
then go to Access policy section, click on Policy generator
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-29.png)
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
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-30.png)
we copy the policy generator to our Access policy section of our SQS queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-31.png)
after create the queue we go back to bucket section than we left the last time and select the queue
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-32.png)
we upload a file in our bucket
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-33-1024x238.png)
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
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-35-1024x366.png)
go to receive messages section ant then click on pull for messages
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-36-1024x320.png)
click on stop polling then you click on the link of the message and see the name of your file
![](https://juliovaldiviamarin.com/wp-content/uploads/2024/07/image-34.png)
Links :
https://console.aws.amazon.com/console/home
Leave a Reply
You must be logged in to post a comment.