Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum policy size error from serverless framework

Deploying a sizeable serverless application, we had first hit the cap of 200 resources. we using serverless-plugin-split-stacks library solved that issue but possibly introduced another one later on:

An error occurred: IamRoleLambdaExecution - Maximum policy size of 10240 bytes exceeded for role pca-console-production-ap-northeast-2-lambdaRole (Service: AmazonIdentityManagement; Status Code: 409; Error Code: LimitExceeded;

This errors related a code lines?

Any advice or suggestion would be appreciated. Thank you in advance.

like image 455
Hax0r Avatar asked Sep 06 '25 07:09

Hax0r


1 Answers

This error is common when the AWS Iam Role you are creating becomes too large. It has a max set size. The same thing would happen if you created an AWS IAMRole via inline json and the policy became too large. Either reduce the IAMRole Policy size or break it up into several policies.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!