Skip to content

Instantly share code, notes, and snippets.

@Tirke
Created January 10, 2020 08:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tirke/75bb3839ea48a5eeb59320a023e251bd to your computer and use it in GitHub Desktop.
Save Tirke/75bb3839ea48a5eeb59320a023e251bd to your computer and use it in GitHub Desktop.
alias
resource "aws_lambda_function" "lambda" {
...
publish = true // Publish a new version of the lambda when the code changes
}
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment