0
0
AWScloud~20 mins

Cognito for user authentication in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cognito Authentication Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does AWS Cognito handle user sign-up confirmation?

When a user signs up in AWS Cognito User Pool, what is the default behavior for confirming the user's account?

AThe user must confirm their account by entering a verification code sent via email or SMS.
BThe user is automatically confirmed without any additional action.
CThe administrator must manually confirm the user in the AWS Console.
DThe user is blocked until they reset their password.
Attempts:
2 left
💡 Hint

Think about how AWS Cognito verifies the user's contact information during sign-up.

Architecture
intermediate
2:00remaining
Choosing the right AWS Cognito feature for social login

You want to allow users to sign in using their Google or Facebook accounts. Which AWS Cognito feature should you use?

AUse Cognito User Pools with Identity Providers configured for Google and Facebook.
BUse Cognito Identity Pools only, without User Pools.
CUse AWS IAM roles directly for social login.
DUse AWS Lambda triggers to authenticate social users manually.
Attempts:
2 left
💡 Hint

Consider which Cognito service manages user authentication and supports social identity providers.

security
advanced
2:00remaining
Securing AWS Cognito User Pool with multi-factor authentication (MFA)

You want to enforce MFA for all users in your Cognito User Pool. Which configuration achieves this?

ASet MFA configuration to 'OPTIONAL' and enable SMS-based MFA as a second factor.
BSet MFA configuration to 'ON' and enable SMS or TOTP as second factors for all users.
CSet MFA configuration to 'OFF' and require users to enable MFA themselves.
DDisable MFA and rely on password complexity only.
Attempts:
2 left
💡 Hint

Think about how to enforce MFA for every user, not just optionally.

Configuration
advanced
2:00remaining
AWS Cognito Identity Pool role assignment behavior

In an AWS Cognito Identity Pool, how does the service assign IAM roles to authenticated users?

AAll authenticated users receive the same IAM role regardless of identity provider.
BIAM roles are assigned randomly to distribute permissions evenly.
CUsers must manually select their IAM role during sign-in.
DIAM roles are assigned based on rules that match the user's identity provider and attributes.
Attempts:
2 left
💡 Hint

Consider how Identity Pools use rules to provide fine-grained access control.

Best Practice
expert
3:00remaining
Minimizing security risks with AWS Cognito Lambda triggers

You use AWS Cognito Lambda triggers to customize user authentication flows. What is a best practice to minimize security risks?

AGrant Lambda functions full administrative permissions to AWS resources for flexibility.
BUse environment variables to store sensitive data like API keys in Lambda functions.
CLimit Lambda function permissions to only what is necessary and validate all inputs carefully.
DDisable logging in Lambda functions to avoid exposing sensitive information.
Attempts:
2 left
💡 Hint

Think about the principle of least privilege and input validation.