Bird
0
0

You want to create a nested resource /users/{userId}/orders with a GET method that triggers a Lambda function. Which sequence of steps is correct?

hard📝 Architecture Q8 of 15
AWS - API Gateway
You want to create a nested resource /users/{userId}/orders with a GET method that triggers a Lambda function. Which sequence of steps is correct?
ACreate /users resource, add GET method, create orders resource, add GET method
BCreate /users resource, create {userId} child resource, create orders child resource, add GET method with Lambda integration
CCreate /users/orders resource directly, add GET method with Lambda integration
DCreate /users resource, create orders resource, add GET method with Lambda integration
Step-by-Step Solution
Solution:
  1. Step 1: Understand nested resource creation

    Nested resources require creating each path segment step-by-step: /users, then {userId}, then orders.
  2. Step 2: Add method on the final resource

    The GET method with Lambda integration is added on the deepest resource (/orders).
  3. Final Answer:

    Create /users resource, create {userId} child resource, create orders child resource, add GET method with Lambda integration -> Option B
  4. Quick Check:

    Nested resources created stepwise, method on last [OK]
Quick Trick: Create nested resources stepwise, add method last [OK]
Common Mistakes:
  • Skipping intermediate resource creation
  • Adding method on wrong resource level
  • Creating full path as one resource

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes