“E2507 IAM Policy Documents needs to be JSON” reported for JSON IAM Policy documents
See original GitHub issuecfn-lint version: (cfn-lint --version
)
cfn-lint 0.7.3
Description of issue.
I have some CloudFormation templates which are written in YAML but contain various JSON IAM policies. cfn-lint
reports these errors for the files in a working branch listed below:
E2507 IAM Policy Documents needs to be JSON
cloudformation/services/concordia-service/service.yaml:183:19
E2507 IAM Policy Documents needs to be JSON
cloudformation/services/concordia-service/service.yaml:224:19
It’s not clear to me what is going on since the JSON is valid and the IAM policy validator doesn’t report any errors.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
“E2507 IAM Policy Documents needs to be JSON” reported for ...
“E2507 IAM Policy Documents needs to be JSON” reported for JSON IAM Policy documents #383 ... CFN: Convert embedded policy documents to YAML...
Read more >The cfn-lint from aws-cloudformation - GithubHelp
Will be created just fine by the Amazon API, but cfn-lint reports: E2507 IAM Policy Documents needs to be JSON test.yaml:7:11 E3002 Property...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We are now parsing the strings and testing them after being parsed.
Looks like this is a string. This shouldn’t be a hard fix for that rule. We can accept strings and try to parse them into JSON. Would that make sense @cmmeyer ?
On another note since YAML should take JSON you should be able to just paste in the JSON. So this removes the error too.