A developer is building a serverless web application. The application requires users to register and sign in. Additionally, authenticated users must be allowed to upload files directly to a private Amazon S3 bucket. Which TWO Amazon Cognito components are required to meet these requirements?
- An Amazon Cognito User Pool to manage user registration, authentication, and the user directoryCevap
- An Amazon Cognito Identity Pool to authorize users and provide temporary AWS credentials for accessing the Amazon S3 bucketCevap
- CA custom Amazon API Gateway Lambda Authorizer to generate temporary IAM credentials for direct Amazon S3 bucket access
- DAn Amazon Cognito User Pool configured to directly issue temporary AWS credentials to the client web application
- EAn Amazon API Gateway Cognito Authorizer configured to authorize direct uploads to the Amazon S3 bucket
Cevap
The developer must use an Amazon Cognito User Pool to manage user registration, authentication, and the user directory, alongside an Amazon Cognito Identity Pool to authorize users and provide temporary AWS credentials for accessing the Amazon S3 bucket.
To implement user authentication (sign-up, sign-in, directory), a Cognito User Pool is required. To authorize the users to access AWS resources directly, such as uploading files to Amazon S3, an Amazon Cognito Identity Pool is required to exchange the User Pool tokens for temporary AWS IAM credentials.
Adım Adım Çözüm
Anahtar Kavram
Distinction between Amazon Cognito User Pools (authentication and identity directory) and Identity Pools (authorization and temporary AWS credentials).