A developer is implementing a desktop gaming client that needs to authenticate users and allow them to upload gameplay screenshots directly to a private Amazon S3 bucket. The application must also communicate with a backend API hosted on Amazon API Gateway, where endpoints should only be accessible to authenticated users.
Which TWO actions must the developer take to implement this authentication and authorization design? (Select TWO.)
- Configure an Amazon Cognito User Pool to handle user registration and authentication, and use the Cognito Authorizer on the API Gateway endpoints.Cevap
- Configure an Amazon Cognito Identity Pool using the User Pool as an identity provider to obtain temporary AWS credentials for S3 uploads.Cevap
- CConfigure the Amazon Cognito User Pool to generate temporary AWS credentials with an attached IAM policy for the S3 bucket.
- DDeploy a custom Lambda Authorizer in API Gateway to decrypt, verify, and validate the signature of the User Pool tokens for basic endpoint security.
- EHardcode a set of long-term IAM access keys within the desktop client to sign the S3 upload requests.
Cevap
To implement this architecture, configure an Amazon Cognito User Pool to handle user registration and authentication, and use the Cognito Authorizer on the API Gateway endpoints. Additionally, configure an Amazon Cognito Identity Pool using the User Pool as an identity provider to obtain temporary AWS credentials for S3 uploads.
To secure the backend API endpoints, the developer should configure an Amazon Cognito User Pool for user authentication and use the built-in API Gateway Cognito Authorizer, which natively validates JWTs without custom backend code. To enable direct uploads to Amazon S3 without exposing long-term credentials, the developer must configure an Amazon Cognito Identity Pool using the User Pool as an identity provider, which issues temporary AWS credentials with appropriate IAM permissions.
Adım Adım Çözüm
Anahtar Kavram
Integration of Amazon Cognito User Pools for authentication and Identity Pools (Federated Identities) for authorizing access to AWS resources like S3.