IAM ManagedPolicy PolicyDocument Character limit of 6144 should not include whitespaces
See original GitHub issuecfn-lint version: (cfn-lint --version
) 0.48.2
Description of issue. There is a 6,144 character limit on IAM managed policies but this does/should not include whitespaces (source). cfn-lint flagged a PolicyDocument of mine as too long, while Cloudformation successfully deploys it. This character limit check would be very helpful if it checked against the same 6,144 character limit that AWS does.
The PolicyDocument is defined in CFN in JSON. I can copy-and-paste this JSON into the AWS Policy Editor and it tells me there are only 4,189 characters in it. I can successfully deploy the CFN stack with this same policy. Counting whitespace, there are 9,849 characters so it seems highly likely that cfn-lint is counting whitespace when it should not be.
cfn-lint complaint:
E3502 Role trust policy JSON text cannot be longer than 6144 characters
Please provide as much information as possible:
- Template linting issues:
- Please provide a CloudFormation sample that generated the issue.
- If present, please add links to the (official) documentation for clarification.
- Validate if the issue still exists with the latest version of
cfn-lint
and/or the latest Spec files
- Feature request:
- Please provide argumentation about the missing feature. Context is key!
Cfn-lint uses the CloudFormation Resource Specifications as the base to do validation. These files are included as part of the application version. Please update to the latest version of cfn-lint
or update the spec files manually (cfn-lint -u
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Thanks for reporting this. I’ll take a look.
yea, you two got it. I finally figured it out 😃 To make it worse we start adding characters to escape out the special characters so absolutely something we needed to get fixed.