AWS Certified Developer – Associate (DVA-C02) — Question 16

A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in.
What is the MOST operationally efficient solution that meets this requirement?

Answer options

Correct answer: B

Explanation

The correct answer is B because using an Amazon Cognito post-authentication Lambda trigger allows for direct invocation of the Lambda function right after a user logs in, ensuring efficient and streamlined processing. Options A and C require additional components that complicate the architecture and introduce latency, while option D involves unnecessary complexity by streaming logs, which is not as efficient as directly using the trigger.