AWS CloudFormation: Seeking the cleanest way to ensure custom resource names don't exceed the length limit

79 views Asked by At

I'm working on a complex codebase that stands up many diverse AWS resources using CloudFormation. However, the codebase applies custom naming for each resource in the stack that often causes deployments to fail because the names get too long.

Unfortunately, each resource type seems to have its own bespoke character limit, so manually updating the codebase to hardcode the limits in all the right places is an endless game of whackamole. We're talking about things like load balancers, SageMaker endpoints, IAM Roles, Secrets, ...

Is there some nice, simple, ideally automatic way to truncate the names of resources that exceed the limit for each resource? For context I'm using AWS's Python CDK.

0

There are 0 answers