cdklabs / cdklabs/cdk-stacksets
Generates AssetBucketDeployment layer id that is too long
- Dominant language
- TypeScript
- Stars
- 118
- Forks
- 25
- Avg merge
- 33m
- Merged PRs (30d)
- 4
Description
```
2:12:54 PM | CREATE_FAILED | AWS::Lambda::Function | CustomCDKBucketDep...CC9EB8756C81C01536
Resource handler returned message: "1 validation error detected: Value '[arn:aws:lambda:eu-central-1:xxxxxxxxxxxx:layer:ManagementCdkStackDeployTestStackTestStackSetStackE0B29806AssetBucketDeployment0AwsCliLayer499ADD6C:1]' 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-z]{2}((-gov)|(-iso(b?)))?-[a-
z]+-\d{1}:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+)|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-_]+), Member must not be null] (Service: Lambda, Status Code: 400, Request ID: 273604b1-26f2-44b3-a6b0-b082f14cd8e8)" (RequestToken: d8015927-6da1-4275-a604-569
7b0a6a224, HandlerErrorCode: InvalidRequest)
```
Shortening the stack id manually fixes the issue for me.
Contributor guide
Research direction
Start by reproducing the deployment with a long stack ID and trace how the AssetBucketDeployment Lambda layer ARN is generated. Use the reported AWS validation error as the acceptance criterion: the generated layer ARN must be no longer than 140 characters and the deployment must complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100