AWS Certified Developer – Associate — Question 156

A developer is building an application integrating an Amazon API Gateway with an AWS Lambda function. When calling the API. the developer receives the following error:

Wed Nov 08 01:13:00 UTC 2017 : Method completed with status: 502

What should the developer do to resolve the error?

Answer options

Correct answer: C

Explanation

The correct answer is C because a 502 error often occurs when the API Gateway receives an invalid response format from the Lambda function. The other options do not address the core issue of the response format, as changing the endpoint or payload format does not resolve the specific response issues from the Lambda function.