Skip to content

Commit

Permalink
Limit lambda function name to 64 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausson committed Mar 1, 2019
1 parent f6afb54 commit f17bdf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ data "archive_file" "index" {
resource "aws_lambda_function" "lambda" {
runtime = "python2.7"
filename = "${path.module}/files/index.zip"
function_name = "${var.autoscaling_group_name}-ecs-instance-draining-on-scale-in"
function_name = "${substr(var.autoscaling_group_name,0,min(64, length(var.autoscaling_group_name)))}"
role = "${aws_iam_role.lambda.arn}"
handler = "index.lambda_handler"

Expand Down

0 comments on commit f17bdf8

Please sign in to comment.