Courseiva
Security →mediumMultiple Choice

DVA-C02 Security Practice Question

A developer is building an application that uses Amazon Cognito for user authentication. The application needs to allow users to sign in with their existing Google accounts. Which action should the developer take to enable this?

⚠ Common exam trap

The trap here is mixing up user pools and identity pools; identity pools are for AWS credentials, while user pools handle authentication and federation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Configure a Cognito user pool with a Google identity provider, providing the Google client ID and client secret.

Cognito user pools natively support federation with Google. Configuring Google as an identity provider in the user pool allows users to sign in with their Google credentials. Cognito handles the OAuth flow, token validation, and user profile creation, simplifying the integration.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Create a Cognito identity pool and enable the Google authentication provider, specifying the Google client ID.

    Why it's wrong here

    Cognito identity pools are used to grant AWS credentials to users, not to authenticate them. While identity pools can accept tokens from Google, they do not handle the sign-in flow. The developer needs a user pool to manage authentication and federation with Google, not just an identity pool.

  • ✓

    Configure a Cognito user pool with a Google identity provider, providing the Google client ID and client secret.

    Why this is correct

    Amazon Cognito user pools support federation with social identity providers like Google. By configuring Google as an identity provider in the user pool, users can sign in with their Google accounts. The developer must supply the Google app's client ID and client secret, which Cognito uses to validate tokens during the federation process.

  • ✗

    Implement a custom OAuth 2.0 flow in the application that directly calls the Google API and then issues AWS credentials.

    Why it's wrong here

    While custom OAuth is possible, it requires significant development effort and does not integrate with Cognito's user management features. Cognito user pools provide a managed, secure way to federate with Google, handling token validation and user profile mapping. Reinventing this flow is unnecessary and error-prone.

  • ✗

    Use AWS IAM to create a role for Google users and attach a policy that allows access to the application.

    Why it's wrong here

    IAM roles are for AWS permissions, not for federating with Google authentication. Google users cannot directly assume IAM roles without a federation service like Cognito. This approach does not provide a sign-in mechanism and is not how social login is implemented.

About these practice questions

One of 1,135 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.