Minimal VPC (modules/vpc) + security group + two modules:
lambda_managed_instance— capacity provider, operator role, and service-linked role wiringlambda_managed_function— execution role, CloudWatch log group, andpython3.14sample function (viacapacity_provider_arnfrom the first module)
Same shape as the repository root stack, but with its own working directory and state file.
Defaults use lmi-basic and 10.0.0.0/16 (two AZs). Use a different vpc_cidr / name_prefix in terraform.tfvars if you deploy multiple examples in one account and region.
cd examples/basic
terraform init
terraform plan
terraform applyOptional: add a terraform.tfvars file to override aws_region, vpc_cidr, name_prefix, or other variables from variables.tf.
aws lambda invoke \
--function-name "$(terraform output -raw lambda_function_name):$(terraform output -raw lambda_version)" \
--payload '{"test":true}' \
--cli-binary-format raw-in-base64-out /tmp/out.json && cat /tmp/out.jsonFirst apply can take several minutes while capacity and the published version become active.
- examples/custom-scaling — manual scaling and allowed instance types
- examples/waf-loki — walkthrough demo base (three AZs by default)
Walkthrough site: aws-lambda-managed-instance-walkthrough.