- AWS Event-Driven Architecture is an approach that utilizes Amazon Web Services to build scalable and decoupled applications.
- It relies on events as the primary means of communication between components.
- The architecture includes event sources that generate events, an event bus for routing events, rules to filter and route events, and targets for actions triggered by events.
- Event Driven Architecture offers benefits such as scalability, loose coupling, flexibility, and real-time processing.
- AWS Account GitHub Repo:- https://github.com/sampathshivakumar/Event-Driven-Architecture
Set the Time out for Lambda to 5 mins
Time out has been modified
Add DynamoDB full access to Lambda
Add print events in Lamda code
As of now there are no cloudwatch logs, as Lambda is not triggered
Go to Properties tab inside your bucket and Create event notification
You should see this
Now what it means is when ever any object is inserted into S3 Bucket it will trigger Lambda function
Lets inssert a simple sample.json file into S3 Bucket
{
"Name" : "SampathShivaKumar",
"Role" : "DevOps",
"Email": "sampathshivakumar@gmail.com"
}
Now we need Lambda to extract content of files and insert it to DynamoDB table
Now we have to code Lambda so that it can extract the content of file and send data to DynamoDB
Now to trigger Lambda upload file again to S3 Bucket
Lambda is working fine, now we have to add these record into DynamoDB table
As of now you can see no data inside DynamoDB Table
Now to trigger Lambda upload file again to S3 Bucket
Now Lets see DynamoDB table again,By now s3 should trriger lambda function and lambda should insert data into DynamoDB table
Note: Special thanks to Amit Nag sir,Code is taken from his GitHub repo https://github.com/nspacer/eventDrivenArchitectureP1 , i have not written the code myself.
Thank you for reading this post! I hope you found it helpful. If you have any feedback or questions,Please connect with me on LinkedIn at https://www.linkedin.com/in/sampathsivakumar-boddeti-1666b810b/. Your feedback is valuable to me. Thank you!