Hard1 markMultiple Choice
Domain 1.2: Security ControlsCognitoSecurityServerless

AWS SAP-C02 · Question 46 · Domain 1.2: Security Controls

A company uses Amazon Cognito User Pools for customer authentication. They want to implement a custom security requirement: if a user logs in from an IP address that is different from their last login, they must be prompted for Multi-Factor Authentication (MFA). If the IP is the same, MFA should be bypassed. How can the architect implement this logic?

Answer options:

A.

Enable Cognito Advanced Security Features and set the risk-based authentication to 'High'.

B.

Use an AWS Lambda trigger for the 'Define Auth Challenge' and 'Create Auth Challenge' stages in Cognito.

C.

Configure AWS WAF with a custom rule to inspect the IP and trigger an MFA redirect.

D.

Use an IAM policy with the aws:SourceIp condition key attached to the Cognito User Pool.

How to approach this question

Look for the extensibility feature of Cognito (Lambda triggers).

Full Answer

B.Use an AWS Lambda trigger for the 'Define Auth Challenge' and 'Create Auth Challenge' stages in Cognito.✓ Correct
Use an AWS Lambda trigger for the 'Define Auth Challenge' and 'Create Auth Challenge' stages in Cognito.
Amazon Cognito User Pools support custom authentication flows via AWS Lambda triggers. By using the 'Define Auth Challenge', 'Create Auth Challenge', and 'Verify Auth Challenge Response' triggers, you can implement custom logic like IP-based conditional MFA.

Common mistakes

Assuming WAF can handle authentication logic.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 4

75 questions · hints · full answers · grading

More questions from this exam