Course menuSAA-C03

Exams / SAA-C03 / Application user sign-in / Question 1

SAA-C03 practice question: Application user sign-in

Design Secure Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A company is building a mobile photo-sharing app.

Users must be able to sign up with an email address and password, or sign in with their Google account. After sign-in, the app uploads photos straight to Amazon S3, and each user may write only under their own prefix in the bucket. The company does not want to run its own sign-in servers or put long-term keys in the app.

Which solution meets these requirements with the LEAST custom code?

Choose one answer.

  1. A. Use a Cognito user pool with Google federation, and a Cognito identity pool whose role limits S3 writes to each user's identity ID prefix.
  2. B. Use IAM Identity Center with Google as the external identity provider, and give each user a permission set that allows S3 uploads.
  3. C. Use a Cognito user pool with Google federation, and have the app send the user pool's ID token straight to S3 with each upload.
  4. D. Have the app call AWS STS AssumeRoleWithWebIdentity with the Google ID token, using a role that limits S3 writes to a per-user prefix.
Show the answer and explanation

Answer: A

Explanation

Amazon Cognito user pools provide sign-up and sign-in for app users, including federation with Google. Cognito identity pools then give signed-in users temporary AWS credentials through an IAM role, and a policy variable on the identity ID keeps each user to their own S3 prefix. IAM Identity Center is for the workforce, and S3 cannot read user pool tokens directly.

Cognito user pool sign-in, then identity pool credentials for S3 The mobile app, which holds no AWS keys, signs the user in with a Cognito user pool and gets an ID token. A Cognito identity pool exchanges the token for temporary credentials of an IAM role. The role allows access only to the user's own prefix in the S3 bucket. Mobile app no AWS keys email and password Cognito user pool sign-in checks the password, returns an ID token Identity pool token exchange trades the token for temporary credentials S3 bucket user's own prefix role allows only this user's prefix
The user pool handles Google sign-in, and the identity pool's role keeps each user to their own identity ID prefix.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Application user sign-in? The 5 full-length practice sets have 10 more Application user sign-in questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets