This template retrieves metadata for a zip file from an S3 bucket and uses it to configure and deploy an AWS Lambda function.

Terraform Template

data "aws_s3_object" "lambda" {
  bucket = "ourcorp-lambda-functions"
  key = "hello-world.zip"
}

resource "aws_lambda_function" "test_lambda" {
}