Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 424 discussion

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?

  • A. Change the HTTP endpoint of the API to an HTTPS endpoint.
  • B. Change the format of the payload sent to the API Gateway.
  • C. Change the format of the Lambda function response to the API call.
  • D. Change the authorization header in the API call to access the Lambda function.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Saudis
1 week ago
Selected Answer: C
When you see a 502 Bad Gateway error in Amazon API Gateway, it means that the API Gateway was unable to get a valid response from Lambda.
upvoted 1 times
...
aws_god
1 week ago
Selected Answer: C
In the logs, review the format of your Lambda function's response to your API. If the response isn't in the required JSON format, then reformat it. https://repost.aws/knowledge-center/malformed-502-api-gateway
upvoted 1 times
...
albert_kuo
1 month ago
Selected Answer: C
Correct response format should be { "statusCode": 200, "headers": { "Content-Type": "application/json" }, "body": "{\"message\": \"Success\"}" }
upvoted 1 times
...
YUICH
1 month ago
the answer is C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...