Chalice should warn or error if generating a name that is too long for CloudFormation
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
We wrote a handler on a blue print that looked something like
```
@our_cool_blueprint.schedule(Rate(12, unit=Rate.HOURS))
def rate_obj_handler(event: Cron) -> None:
do stuff()
```
Which seemed innocent enough. When we went to do a CloudFormation deploy from the results of `chalice package`, cloudformation tried to create this resource
`OurCoolrateObjHandlerOurCoolrateObjHandlerEventLambdaTarget` which encountered this error
```
1 validation error detected: Value 'OurCoolrateObjHandlerOurCoolrateObjHandlerEventLambdaTarget' at 'targets.1.member.id' failed to satisfy constraint: Member must have length less than or equal to 64 ...
```
Could there be a warning or error on chalice package when a resource name is potentially too long? And/or is there something in our naming/blueprint conventions we are doing wrong?
Contributor guide
Research direction
Start by reproducing the shown blueprint and handler with `chalice package`, then inspect the generated CloudFormation resource name and the package command's validation path. Done means `chalice package` identifies names exceeding CloudFormation's 64-character target limit with a warning or error, rather than leaving deployment to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100