Day 22–101 Days of DevOps — Introduction to AWS Lambda

What is AWS Lambda?

* 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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store