Bird
0
0

What response will the client receive when making a POST request to this endpoint?

medium📝 Predict Output Q4 of 15
AWS - API Gateway
An AWS API Gateway is set up with a POST method integrated with a Lambda function that returns {"message": "success"}. What response will the client receive when making a POST request to this endpoint?
AThe client receives a JSON response: {"message": "success"}
BThe client receives an empty response with status 204 No Content
CThe client receives a 404 Not Found error
DThe client receives a 500 Internal Server Error
Step-by-Step Solution
Solution:
  1. Step 1: Understand API Gateway Integration

    When API Gateway is integrated with a Lambda function, the response from Lambda is passed back to the client.
  2. Step 2: Lambda Function Response

    The Lambda function returns a JSON object {"message": "success"} which API Gateway forwards as the HTTP response body.
  3. Final Answer:

    {"message": "success"} -> Option A
  4. Quick Check:

    Lambda response is proxied by API Gateway [OK]
Quick Trick: Lambda output is returned as API Gateway response body [OK]
Common Mistakes:
  • Assuming API Gateway modifies the Lambda response automatically
  • Expecting an empty response when Lambda returns data
  • Confusing HTTP status codes returned by API Gateway

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes