๐ Hello Everyone! In this blog post, we're leaping headfirst into the heart of Amazon Web Services serverless computing service, Lambda.
๐ Think of this blog post as your knowledgeable companion, here to swiftly guide you through the fundamental concepts of AWS Lambda.
AWS Lambda Overview:
AWS Lambda is a service for running your code without managing servers.
You just upload your code, and AWS runs it when needed.
Key Points:
No server management: AWS handles everything.
It's "serverless" because you don't need to worry about servers.
You pay only for the compute power used when code runs.
How It Works:
Add Code: Upload your code to Lambda or write it in the provided editor.
Configure Triggers: Set triggers to execute your code based on events (like files being uploaded to S3).
Run Code: When triggers occur, AWS Lambda runs your code using the required compute power.
Cost Tracking: AWS records compute time and number of executions for billing.
Elements of Lambda Application:
Lambda Function: Your code that Lambda will run.
Event Source: AWS services that trigger your Lambda function (like S3).
Trigger: Operation from an event source that makes your function run.
Downstream Resources: Other services your function might use.
Log Streams: Records of function events for troubleshooting.
Metrics: Function performance data sent to CloudWatch.
Creating a Lambda Function:
Start with a blueprint (template) and customize it.
Configure triggers (like S3 events) that make your function run.
Finish by uploading or editing your code, setting resources, execution timeout, IAM role, and handler name.
Benefits:
Highly scalable and serverless service.
Cost-efficient since you pay only when code runs and per function execution.
๐ก Resources :
Understanding AWS Lambda to Run and Scale your Code
Lab: Introduction to AWS Lambda