Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate and limit names for PutRule #61

Open
ssm951 opened this issue May 25, 2022 · 0 comments
Open

Validate and limit names for PutRule #61

ssm951 opened this issue May 25, 2022 · 0 comments

Comments

@ssm951
Copy link

ssm951 commented May 25, 2022

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),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant