Skip to content

lambda policy size exceeds limit when used with multiple RestApi methods #5774

@AmitBaranes

Description

@AmitBaranes

short description:

Override Lambda Permission manually when creating a new API Gateway method.

Use Case

Recently I faced this issue when pointing multiple API Gateways methods to specific lambda :

The final policy size (XXX) is bigger than the limit (20480)

The feature allows users to bypass automatic permission creation (sort of "manual mode") to avoid this limitation.

I noticed that when using LambdaIntegration class the bind function adds permissions automatically to the lambda function based on the method URL.

My workaround was overriding the bind function with my own class ( see this post - https://stackoverflow.com/questions/59713522/cdk-override-bind-when-using-lambdaintegration?noredirect=1#comment105588249_59713522) and implement my own logic.

This feature can give more flexibility to the end-user and could give more control about the lambda permissions.

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-apigatewayRelated to Amazon API Gatewayclosing-soonThis issue will automatically close in 4 days unless further comments are made.feature-requestA feature should be added or improved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions