architect: Unable to deploy lambda with layers

Describe the issue When running deploy of a scheduled lambda with the following .arc-config

@aws
runtime nodejs10.x
timeout 900
layers
  arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:8

The deploy fails for ResourcesStatusReason

"ResourceStatusReason": "1 validation error detected: Value '[0]' at 'layers' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 140, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: (arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+)|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-_]+)] (Service: AWSLambdaInternal; Status Code: 400; Error Code: ValidationException; Request ID: da85e269-9e08-47a7-b797-3cd7665b8d5a)",

and the cloudformation output is ResourceProperties contains:

\"Layers\":[\"0\"]

When changing to

@aws
runtime nodejs10.x
timeout 900
layer arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:8

The deploy succeeds but Layers is not present in the resulting ResourceProperties, and the resulting lambda as visible in the AWS console has no layers.

Steps to reproduce Steps to reproduce the behavior:

  1. Make a scheduled lambda function
  2. Use the above arc configs for the lambda (with it scheduled in the .arc file)
  3. Run arc deploy

Expected behavior The lambda has the layer arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:8

Additional context Used node v10.19.0, architect 6.4.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (12 by maintainers)

Most upvoted comments

Patched and released in 6.4.1! Thanks again for your patience, @jessrosenfield.