This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 4.0" | |
} | |
} | |
} | |
provider "aws" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "env_name" { | |
description = "Environment name" | |
} | |
data "aws_ecr_repository" "profile_faker_ecr_repo" { | |
name = "profile-faker" | |
} | |
resource "aws_lambda_function" "profile_faker_function" { | |
function_name = "profile-faker-${var.env_name}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM public.ecr.aws/lambda/python:3.9 | |
# Install the function's dependencies using file requirements.txt | |
# from your project folder. | |
COPY requirements.txt . | |
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" | |
# Copy function code | |
COPY main.py ${LAMBDA_TASK_ROOT} |
OlderNewer