Topic 1 Question 375
A company is developing an application that will be accessed through the Amazon API Gateway REST API. Registered users should be the only ones who can access certain resources of this API. The token being used should expire automatically and needs to be refreshed periodically.
How can a developer meet these requirements?
Create an Amazon Cognito identity pool, configure the Amazon Cognito Authorizer in API Gateway, and use the temporary credentials generated by the identity pool.
Create and maintain a database record for each user with a corresponding token and use an AWS Lambda authorizer in API Gateway.
Create an Amazon Cognito user pool, configure the Cognito Authorizer in API Gateway, and use the identity or access token.
Create an IAM user for each API user, attach an invoke permissions policy to the API, and use an IAM authorizer in API Gateway.
ユーザの投票
コメント(2)
- 正解だと思う選択肢: C
Option A (Amazon Cognito Identity Pool): An Amazon Cognito Identity Pool provides temporary AWS credentials for users but is typically used in conjunction with user pools for unauthenticated access and to interact with AWS services. It does not handle user authentication and token expiration directly as needed for API access.
👍 5rdiaz2024/07/11 - 正解だと思う選択肢: C
The best solution is C. Create an Amazon Cognito user pool, configure the Cognito Authorizer in API Gateway, and use the identity or access token.
Here's why:
Cognito User Pools are designed for managing user identities and authentication. They handle user registration, login, and token generation securely. The tokens (ID and access tokens) generated by Cognito have built-in expiration mechanisms, automatically handling the refresh requirement.
Cognito Authorizer in API Gateway seamlessly integrates with Cognito User Pools. It verifies the tokens presented by the client, ensuring only authorized users can access protected resources.
👍 1examuserss2024/12/31
シャッフルモード