Skip to content

Cloudformation: Inconsistent name length restrictions #888

Description

@arunjohney-freightways

As we are building more of our infrastructure via cloudformation we are running into instances where different resources have different name length restrictions. Here are some examples that we've come across, and they range from a maximum of 32 to some allowing over 400 characters.

Target group name:
A maximum of 32 alphanumeric characters including hyphens are allowed, but the name must not begin or end with a hyphen.

RDS:
The DB cluster identifier is case-insensitive, but is stored as all lowercase (as in "mydbcluster"). Constraints: 1 to 60 alphanumeric characters or hyphens. First character must be a letter. Can't contain two consecutive hyphens. Can't end with a hyphen.

CloudWatch Event Rule Name:
Details: The supplied rule name is invalid. Maximum allowed length is 64.

Lambda: Function Name:
This field is too long. The maximum length is 64 characters.

DynamoDB table:
Between 3 and 255 characters long.

Rest Api Gateway:
Not sure of the length, but it can take over 400 characters.

The inconvenience this causes us is to be able to set a standard naming convention across all resource types. Ideally we would like to be able to name a domain stack of resources in a way which identifies them easily.

We also suffix the name with the environment they are deployed in (dev, test, sandbox, prod).
The other issue is as we deploy our resources into the dev account, everything would be fine. But in sandbox it fails as it has crossed the max name length limit. Not all the name length limits are documented in the CloudFormation documentation.

Is there something on the roadmap for AWS to align the naming standards of the resources?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions