Skip to content

Instantly share code, notes, and snippets.

@Tirke
Created January 10, 2020 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tirke/f172cd0035e30e718d0463906521f85f to your computer and use it in GitHub Desktop.
Save Tirke/f172cd0035e30e718d0463906521f85f to your computer and use it in GitHub Desktop.
resource "aws_lambda_alias" "lambda-alias" {
name = "latest"
description = "alias pointing to the latest published version of the lambda"
function_name = aws_lambda_function.lambda.function_name
function_version = aws_lambda_function.lambda.version
}
resource "aws_lambda_provisioned_concurrency_config" "keep-lambda-warm" {
function_name = aws_lambda_alias.lambda-alias.function_name
provisioned_concurrent_executions = 1
qualifier = aws_lambda_alias.lambda-alias.name
depends_on = [aws_lambda_function.lambda]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment