Cloudfront showing limit error

0

I have my landing page deployed via Amplify. On the sitemap xml the sitemap is not getting accessed as the limit is exceeded for response length (not sure).

ERROR 502 The Lambda function result failed validation: The body is not a string, is not an object, or exceeds the maximum size. See Limits in the Amazon CloudFront Developer Guide. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

RESPONSE DATA in network tab content-length: 1074 content-type: text/html

I guess the max permissible length is 1024 bytes. Can someone correct me if I am guessing wrong. Also, can someone point me to articles if and how I can increase the limit to maybe 4096.

1 réponse
0

From the error, it appears you're using a Lambda@Edge function, but you haven't mentioned what it's doing, or what trigger it's on. If you're using Lambda@Edge to generate a response, the size is limited to 40KB (for Viewer triggers) or 1MB (for Origin triggers) - see documentation here: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-lambda-at-edge

Does the function behave as expected when testing it? Do you have logging enabled for the function, and does that yield any information as to what the problem might be?

AWS
EXPERT
Paul_L
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions