Skip to content

Validate and limit names for PutRule #61

Open
@ssm951

Description

@ssm951

I noticed for resources with really long name, appending 8 random characters would make the PutRule name too long, causing an exception like the following:

An error occurred (ValidationException) when calling the PutRule operation: 1 validation error detected: Value '<SomeLongNameOver64Characters>' at 'name' failed to satisfy constraint: Member must have length less than or equal to 64

It may be better to truncate the Name string below if it has more than 56 characters, and then append the 8 random characters to ensure the name is less than 64 characters:

Name=self._event['LogicalResourceId'] + self._rand_string(8),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions