AWS::Lambda::Function
- Serverless! No servers to manage
- Ideal to simple short executions
- Run
on demandwithautoscaling Lambda Container Image: it's an specify kind of container that is meant to be run on Lambda. It's different from the conventional docker image
Limits
Execution- Memory: 128 MB - 10 GB
- Max duration: 15 min
- Environment variables: 4 KB
- Disk capacity (/tmp): 512 MB
- Concurrent executions: 1000 (can be increased)
Deployment- Size (compressed .zip): 50 MB
- Size (code + dependencies): 250 MB
Pricing
Pay per call- First 1M is free
- After that, $0.20 per 1M
Pay per duration- First 400000 seconds / month is free (for 1GB RAM)
Integrations
- API Gateway
- Kineses
- DynamoDB
- S3
- Cloudfront
- CloudWatch Events
- CloudWatch Logs
- SNS
- SQS
- Cognito
Use cases
-
Thumbnail creation

-
Serverless cronjob

Properties
Code
import json
def lambda_handler(event, context):
body = "Hello from Lambda!"
statusCode = 200
return {
"statusCode": statusCode,
"body": json.dumps(body),
"headers": {
"Content-Type": "application/json"
}
}
Role
- By default, lambda functions has a
rolewith policy able to write toCloudWatch
Runtime
- Node.js
- Python
- Java
- C#
- Golang
- Ruby
- Custom Runtime API (enables any language, e.g., Rust)