Courseiva
Question 607 of 724
SecuritymediumMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer is building a mobile application that uses Amazon Cognito for user authentication. After a user signs in, the application needs to access an Amazon DynamoDB table. The developer has set up an identity pool with an authenticated role. The IAM role attached to the authenticated identity has a policy allowing the required DynamoDB actions. However, users report that they cannot perform DynamoDB operations. What is the MOST likely cause of this issue?

⚠ Common exam trap

The trap here is that candidates often focus on the permissions policy (allowing DynamoDB actions) and overlook the trust policy, which is a separate and critical requirement for Cognito to assume the role and generate credentials.

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

The IAM role's trust policy does not allow Cognito to assume it.

The most likely cause is that the IAM role's trust policy does not include a statement allowing Amazon Cognito (specifically the `cognito-identity.amazonaws.com` service principal) to assume the role. Even if the identity pool is configured to use the authenticated role and the role's permissions policy grants DynamoDB actions, Cognito must be able to assume the role via AWS Security Token Service (STS) `AssumeRoleWithWebIdentity`. Without the correct trust relationship, Cognito cannot obtain temporary credentials for the user, so all DynamoDB operations fail.

Answer analysis

Option-by-option breakdown

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

  • The identity pool is not configured to use the authenticated role.

    Why it's wrong here

    If the identity pool were not configured, the app would likely fail to obtain any credentials entirely, but the question states the developer set up the identity pool with an authenticated role, so this is not the most likely cause.

  • The app is not passing the correct identity ID.

    Why it's wrong here

    The AWS SDKs for mobile and web applications are designed to automatically manage the identity ID lifecycle after a user successfully authenticates with Amazon Cognito User Pools. The application code typically does not need to explicitly pass or handle the identity ID directly to obtain temporary AWS credentials. If the identity ID were incorrect or invalid, the application would likely fail to acquire any temporary credentials from Cognito Identity Pools at all, rather than successfully signing in but then encountering permission denied errors for subsequent operations.

  • The IAM role's trust policy does not allow Cognito to assume it.

    Why this is correct

    The trust policy of an IAM role explicitly defines which entities are permitted to assume that role. For Amazon Cognito Identity Pools to issue temporary AWS credentials to an authenticated user, the IAM role associated with the authenticated identity must have a trust policy that grants the Cognito Identity service principal (cognito-identity.amazonaws.com) the sts:AssumeRole permission. Without this crucial trust relationship, Cognito cannot generate the necessary temporary credentials, leading to 'Access Denied' errors when the application attempts to interact with other AWS services, regardless of the permissions policy attached to the role.

  • The DynamoDB table is encrypted with a different KMS key.

    Why it's wrong here

    While DynamoDB tables can indeed be encrypted with customer-managed KMS keys, requiring the IAM role to possess `kms:Decrypt` permissions for that specific key, this is a secondary permissions concern. The scenario describes users being signed in but unable to perform *any* operations, which points to a more fundamental failure in obtaining valid AWS credentials with the necessary permissions in the first place. A KMS key issue would typically manifest as specific decryption failures when accessing the table, not a general inability to interact with the service at all, especially if the table uses default AWS-owned or AWS-managed keys.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.