IAM: Maximum policy size of 10240 bytes exceeded for role..
See original GitHub issueWhat is the problem?
Our app has a lot of resources (mostly a lot of secrets). This is causing the auto-generated inline policy max combined size to be exceeded. Even though this bug is technically covered by this feature request since using Managed Policies is probably the primary fix, I thought I should formally file this issue.
Reproduction Steps
Grant a lot of permissions to a resource that exceeds a total of 10240 bytes.
What did you expect to happen?
Policy consolidation, see this feature request, or the use of managed policies enables more than 10240 of policies.
What actually happened?
CloudFormation error: Maximum policy size of 10240 bytes exceeded for role...
CDK CLI Version
2.7.0 (build cfb09d5)
Framework Version
No response
Node.js Version
16.13.1
OS
Mac OS 12.1
Language
Python
Language Version
No response
Possible solutions:
https://github.com/aws/aws-cdk/issues/7448 https://github.com/aws/aws-cdk/issues/18458
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Increase the managed policies or character size limit ... - AWS
The maximum limit for attaching a managed policy to an IAM role or user is 20. The maximum character size limit for managed...
Read more >IamRoleLambdaExecution - Maximum policy size of 10240 ...
An error occurred : IamRoleLambdaExecution - Maximum policy size of 10240 bytes exceeded for role Vkonnect-dev-ap-south-1-lambdaRole ...
Read more >AWS Amplify CLI “IAM Authorization Role Error: Maximum ...
“IAM Authorization Role Error: Maximum policy size of 10240 bytes exceeded for role”. Well, you're not alone, I'm gonna help you solve it ......
Read more >How can I increase the default managed policies or ... - YouTube
How can I increase the default managed policies or character size limit for an IAM role or user?
Read more >IAM and Amazon STS quotas, name requirements, and ...
IAM and STS character limits · User policy size cannot exceed 2,048 characters. · Role policy size cannot exceed 10,240 characters. · Group...
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 FreeTop 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
Top GitHub Comments
Nothing scalable. Just realized I was adding the secrets to the task role (which already had a bunch of policies) when they’re only needed on the execution role. That made both role policies small enough for now.
If I hit the limit again, I’ll probably strip all the secrets out of the task definition, grant the task permissions to get secrets on
<env>/*
, and make the task retrieve the secrets itself.⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.