Created
March 27, 2025 00:00
-
-
Save nivleshc/ce3019d5d1fc42a9cca781e426c6ad00 to your computer and use it in GitHub Desktop.
This gist contains code from the file lambda.tf which is part of the blog-photo-location-map repository.
This file contains 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
resource "aws_lambda_function" "upload_photo_lambda" { | |
filename = data.archive_file.upload_photo_lambda_src.output_path | |
function_name = "${local.lambda_function_name_prefix}-upload-photo-lambda" | |
timeout = local.lambda_function_timeout | |
role = aws_iam_role.lambda_role.arn | |
handler = "upload-photo-lambda.lambda_handler" | |
source_code_hash = data.archive_file.upload_photo_lambda_src.output_base64sha256 | |
runtime = local.lambda_runtime | |
layers = [aws_lambda_layer_version.photo_location_map_layer.arn] | |
environment { | |
variables = { | |
BUCKET_NAME = local.website_s3_bucket_name | |
CSV_FILE_KEY = local.csv_file_key | |
IMAGES_FOLDER_KEY = local.images_folder_key | |
PRESIGN_URL_EXPIRATION = local.presign_url_expiration | |
COGNITO_POOL_ID = aws_cognito_user_pool.user_pool.id | |
COGNITO_REGION = local.region | |
} | |
} | |
depends_on = [ | |
aws_cloudwatch_log_group.upload_photo_lambda_loggroup | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment