Hello World on AWS Lambda Managed Instances (Python, Terraform)

AWS Lambda → Managed Instances (EC2)

Deploy a Python Hello World AWS Lambda function on Lambda Managed Instances using Terraform.

This pattern demonstrates how to deploy a simple Hello World Lambda function running on Lambda Managed Instances using Terraform.
Lambda Managed Instances provide predictable performance and reduced cold starts for your Lambda functions by pre-warming execution environments.
The Hello World function accepts an event with a name parameter and returns a simple JSON response with a greeting message.
The Terraform implementation includes a complete VPC setup with private subnets, NAT gateways, and proper security groups for Lambda Managed Instances.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-managed-instances-tf

Deploy

terraform initterraform planterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: terraform destroy.

Created by:

Matt Boland

Matt Boland

Sr. Solutions Architect, AWS.

Follow on LinkedIn