terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 3.27" } } required_version = ">= 0.14.9" } provider "aws" { profile = "default" region = "us-east-1" } data "aws_caller_identity" "current" {} data "aws_region" "current" {} # Create a zip file from the Lambda source code data "archive_file" "LambdaZipFile" { type = "zip" source_file = "${path.module}/src/LambdaFunction.py" output_path = "${path.module}/LambdaFunction.zip" } # Create an IAM role for API Gateway resource "aws_iam_role" "APIGWRole" { assume_role_policy = <