Use Lambda Functions within a Stateless Architecture on AWS
In this lab, you’ll practice using Lambda Functions within a stateless architecture, When you’re finished with this lab, you’ll have learned to run code without provisioning or managing servers.
Terms and conditions apply.
Create a Lambda Function with a Role
You’ll configure a Lambda Function with a role, which will have permissions for an S3 bucket and a DynamoDB.
Add an S3 Trigger to the Lambda Function
You’ll add an S3 trigger and configure two events, one that triggers when any object is created, the second that triggers when an object is permanently deleted.
Add Code to the Lambda Function
You’ll add Python 3.8 code that is triggered by the S3 Bucket events you just created. This code will add an entry to the DynamoDB database table (which was added for you).
Trigger Lambda Function Code
When you upload or delete a file in an S3 Bucket, an event will be generated, which will execute the Lambda Function. Its code will add information to the DynamoDB database table.
Use AWS Lambda to Trigger Email Notification on S3 Events
When a user uploads or deletes a file in an S3 bucket, an event will be generated, which will trigger the Lambda function and then it will send an email notification and also generate CloudWatch logs.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
- AWS Certified Solutions Architect: Associate or Equivalent knowledge
- Basic understanding of virtual machines in general and AWS EC2 in particular (ability to deploy, start, stop, and configure VMs)
- Basic understanding of S3 Service and S3 Console UI/X, DynamoDB, and IAM roles