Bird
0
0

How can you secure a resource method in API Gateway to allow only authenticated users via AWS Cognito?

hard📝 Application Q9 of 15
AWS - API Gateway
How can you secure a resource method in API Gateway to allow only authenticated users via AWS Cognito?
AEnable API key requirement on the method
BDisable authorization to allow all users
CUse IAM roles only without Cognito
DSet the method authorization type to COGNITO_USER_POOLS and specify the user pool
Step-by-Step Solution
Solution:
  1. Step 1: Identify Cognito integration for authorization

    API Gateway supports Cognito user pools as an authorization type to secure methods.
  2. Step 2: Configure method authorization

    Set the method's authorization type to COGNITO_USER_POOLS and link the user pool to enforce authentication.
  3. Final Answer:

    Set the method authorization type to COGNITO_USER_POOLS and specify the user pool -> Option D
  4. Quick Check:

    Cognito auth = COGNITO_USER_POOLS setting [OK]
Quick Trick: Use COGNITO_USER_POOLS for Cognito auth [OK]
Common Mistakes:
MISTAKES
  • Confusing API key with Cognito auth
  • Using IAM roles only without Cognito
  • Disabling authorization mistakenly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes