Created
March 26, 2025 23:57
-
-
Save nivleshc/4e50dd9f7932e0483f6d707abe01abd8 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" "fetch_object_lambda" { | |
filename = data.archive_file.fetch_object_lambda_src.output_path | |
function_name = "${local.lambda_function_name_prefix}-fetch-object-lambda" | |
timeout = local.lambda_function_timeout | |
role = aws_iam_role.lambda_role.arn | |
handler = "fetch-object-lambda.lambda_handler" | |
source_code_hash = data.archive_file.fetch_object_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 | |
COGNITO_POOL_ID = aws_cognito_user_pool.user_pool.id | |
COGNITO_REGION = local.region | |
} | |
} | |
depends_on = [ | |
aws_cloudwatch_log_group.fetch_object_lambda_loggroup | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment