AWS - API GatewayHow can you secure a resource method in API Gateway to allow only authenticated users via AWS Cognito?AEnable API key requirement on the methodBDisable authorization to allow all usersCUse IAM roles only without CognitoDSet the method authorization type to COGNITO_USER_POOLS and specify the user poolCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify Cognito integration for authorizationAPI Gateway supports Cognito user pools as an authorization type to secure methods.Step 2: Configure method authorizationSet the method's authorization type to COGNITO_USER_POOLS and link the user pool to enforce authentication.Final Answer:Set the method authorization type to COGNITO_USER_POOLS and specify the user pool -> Option DQuick Check:Cognito auth = COGNITO_USER_POOLS setting [OK]Quick Trick: Use COGNITO_USER_POOLS for Cognito auth [OK]Common Mistakes:MISTAKESConfusing API key with Cognito authUsing IAM roles only without CognitoDisabling authorization mistakenly
Master "API Gateway" in AWS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More AWS Quizzes API Gateway - API Gateway throttling - Quiz 14medium AWS Lambda - Lambda execution model - Quiz 11easy Auto Scaling - Scaling policies (target tracking, step, simple) - Quiz 14medium CloudWatch - CloudWatch Events (EventBridge) - Quiz 9hard DynamoDB - Secondary indexes (GSI, LSI) - Quiz 15hard Elastic Load Balancing - Network Load Balancer (NLB) - Quiz 6medium RDS and Relational Databases - RDS security (encryption, security groups) - Quiz 4medium SNS and SQS - Dead letter queues - Quiz 15hard SNS and SQS - SQS queue concept - Quiz 11easy SNS and SQS - SNS and SQS integration pattern (fan-out) - Quiz 14medium