Day 22–101 Days of DevOps — Introduction to AWS Lambda | by Prashant Lakhera | Jul, 2021

Welcome to Day 22 of 101 Days of DevOps. The topic for today is the AWS Lambda.

To view the complete course, please check the below url.

For more info, register via the below link

YouTube Channel link

What is AWS Lambda?

With AWS Lambda, you can run code without provisioning or managing servers. You pay only for the compute time that you consume — there’s no charge when your code isn’t running. You can run code for virtually any type of application or backend service — all with zero administration. Just upload your code, and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger other AWS services or call it directly from any web or mobile app.

Go to https://us-west-2.console.aws.amazon.com/lambda → Create a function.

* Author from scratch: Which is self explanatory, i.e you are writing your own function
*
Use a blueprint: Build a lambda application from sample code and configuration preset for common use cases(Provided by AWS)
*
Browse serverless app repository: Deploy a sample lambda application from the AWS Serverless Application Repository(Published by other developers and AWS Patners)
*
Container Image: Lambda now supports container image which means you can package and deploy functions as a container image

Invoking Lambda Function

* Amazon S3 Pushes Events
* AWS Lambda Pulls Events from a Kinesis Stream
* HTTP API requests through API Gateway
* CloudWatch Schedule Events
import jsondef lambda_handler(event, context):
# TODO implement
print(event) <--------
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}

Lambda Programming Model

* Handler: Handler is the function AWS Lambda calls to start execution of your Lambda function, it act as an entry point.

Some new features

Lambda Layer: This is one feature I need badly in AWS Lambda and thanks AWS for introducing this feature and the feature is called the Lambda layer.

Lambda layer lets you share your code, you can upload the layer once, and then you can reference it any function. More about the Lambda layer in the below video.

If you like to dig deeper into the AWS concept, please feel free to check my book.

Looking forward to you guys joining this journey and spend a minimum of an hour every day for the next 101 days on DevOps work and post your progress using any of the below mediums.

Related posts

Celebrating Nowruz in the Digital Age: The Intersection of Technology and Spirituality

Google Pixel 9a:Performance and Value

Google Pixel 9a: The Unsung Hero of Budget Smartphones – Why It Deserves Your Attention

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More