I have a server less API with AWS API Gateway and Lambda function. I am using custom authorization function for authorization. The header is too large and due to which I am getting this error. Normally, for an nginx server, I would have changed the nging config and this would have been fixed. I don't know how to take care of this in AWS API Gateway.
The 10MB payload limit applies to the message body. If you're running into limits on the header size, unfortunately these cannot be configured. They are stated on the CloudFront page: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html
In particular:
Custom headers: maximum length of a header name 256 characters
Custom headers: maximum length of a header value 2,048 characters
Custom headers: maximum length of all header values and names combined 10,240 characters
The limit for payload size currently cannot be changed. From https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html:
10MB payload size, which cannot be changed currently.
If you want more customization, you should run your API on an actual server (e.g. with Amazon EC2).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With