Greetings, I am attempting to use an AWS maintained arn for a Lambda Layer’s source. Would the below configuration be best practice or would it even work?
resource "aws_lambda_layer_version" "lambda_layer" {
#filename = "python37-pandas.zip"
layer_name = "aws-pandas-py38-layer"
compatible_runtimes = ["python3.8"]
arn = "arn:aws:lambda:us-east-1:336392948345:layer:AWSSDKPandas-Python38:1"
}
module "lambda_test" {
...
layers = [aws_lambda_layer_version.lambda_layer.arn]
environment = {
variables = {
destination_bucket_name = "us-east-1-silver-sbx-${terraform.workspace}"
}
}
}
As a sidenote, could I specify a static layer arn directly on the lambda module?