Bird
0
0

You have this response mapping template:

medium📝 Debug Q14 of 15
AWS - API Gateway
You have this response mapping template:
{
  "message": "$input.path('$.msg')",
  "status": "$input.path('$.code')"
}

But the backend returns:
{"message": "Success", "code": 200}

What is the main issue causing the mapping to fail?
AThe template uses wrong JSON paths not matching backend keys
BThe backend response is not valid JSON
CThe template syntax is missing quotes around keys
DThe backend response keys are case-insensitive
Step-by-Step Solution
Solution:
  1. Step 1: Compare template paths with backend keys

    The template expects msg and code, but backend returns message and code.
  2. Step 2: Identify mismatch causing failure

    Since msg does not exist in backend response, mapping fails for that field.
  3. Final Answer:

    The template uses wrong JSON paths not matching backend keys -> Option A
  4. Quick Check:

    Template paths must match backend keys exactly [OK]
Quick Trick: Ensure template JSON paths match backend response keys exactly [OK]
Common Mistakes:
  • Assuming backend keys are case-insensitive
  • Thinking syntax errors cause this issue
  • Ignoring key name mismatches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes