Bird
0
0

Which of the following is the correct way to define a resource path in AWS API Gateway for a REST API?

easy📝 Syntax Q3 of 15
AWS - API Gateway
Which of the following is the correct way to define a resource path in AWS API Gateway for a REST API?
Ausers/userId
B/users/{userId}
C/users/userId/
Dusers/{userId}
Step-by-Step Solution
Solution:
  1. Step 1: Understand resource path syntax

    Resource paths start with a slash and use curly braces for variables.
  2. Step 2: Compare options

    /users/{userId} correctly uses slash and curly braces; others miss slash or braces.
  3. Final Answer:

    /users/{userId} -> Option B
  4. Quick Check:

    Resource path syntax = /resource/{variable} [OK]
Quick Trick: Use slashes and curly braces for path variables [OK]
Common Mistakes:
  • Omitting leading slash
  • Not using curly braces for variables
  • Adding trailing slash unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes