DVA-C02 Security Practice Question
A developer needs to allow an IAM user in a different AWS account to assume a role in the developer's account. The role has permissions to access an S3 bucket. Which policy is required in the developer's account to enable this cross-account access?
⚠ Common exam trap
It's easy for candidates to confuse the location of the trust policy (required in the account owning the role) with the permissions policy (required in the external account), or mistakenly think an S3 bucket policy alone can enable cross-account role assumption.
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
✓
An IAM role with a trust policy that allows the external account's root user or specific IAM users/roles to assume the role
Cross-account IAM role access requires a trust policy attached to the role in the developer's account. This trust policy specifies the external AWS account ID (or specific IAM users/roles in that account) as the principal, allowing them to call sts:AssumeRole. Once the role is assumed, the developer's account grants the necessary S3 permissions via the role's permissions policy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
An IAM role with a trust policy that allows the external account's root user or specific IAM users/roles to assume the role
Why this is correct
This is the correct mechanism for cross-account role assumption. An IAM role's trust policy (also known as an assume role policy) explicitly defines which AWS principals, including users or roles from other AWS accounts, are permitted to assume that role. By specifying the external account ID or a specific ARN of an IAM user/role within the `Principal` element of the trust policy, the role establishes the necessary cross-account trust relationship, allowing the external entity to temporarily gain the role's permissions.
- ✗
An S3 bucket policy granting access to the external account
Why it's wrong here
An S3 bucket policy is used to grant direct permissions to specific AWS principals (users, roles, or even other accounts) to interact with objects within that particular S3 bucket. While it can facilitate cross-account access to S3 resources, it does so directly at the resource level and does not involve the mechanism of assuming an IAM role. The question explicitly asks how to allow an IAM user to *assume a role* in a different account, making a bucket policy an irrelevant solution for the specified requirement.
- ✗
An IAM user policy in the external account allowing sts:AssumeRole
Why it's wrong here
An IAM user policy in the external account allowing sts:AssumeRole is a necessary client-side permission for the external user to initiate the API call to assume a role. However, this policy alone only grants the *ability* to request role assumption; it does not establish the trust relationship with the target role in the other AWS account. The target role itself must explicitly permit the external principal to assume it, which is handled by the role's trust policy, not the user's permissions policy.
- ✗
An AWS Organizations service control policy allowing cross-account access
Why it's wrong here
An AWS Organizations Service Control Policy (SCP) is a guardrail that defines the maximum available permissions for all IAM entities (users and roles) within the affected accounts in an AWS Organization. SCPs are used to *restrict* actions and enforce compliance across accounts by setting permission boundaries, not to *grant* permissions or establish trust relationships for cross-account role assumption. They cannot be used to allow an external account to assume a role; their function is purely to set permission boundaries.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DVA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is designing a multi-account strategy using AWS Organizations. They want to enable cross-account access for developers using IAM roles. Each developer has an IAM user in the 'developers' account. The 'production' account has an IAM role 'AdminRole' that can be assumed by the 'developers' account. Which trust policy should be attached to 'AdminRole'?
hard- ✓ A.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:root"},"Action":"sts:AssumeRole"}]} where 123456789012 is the developers account ID.
- B.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}
- C.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:user/*"},"Action":"sts:AssumeRole"}]}
- D.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:role/AdminRole"},"Action":"sts:AssumeRole"}]}
Why A: The trust policy on the 'AdminRole' in the production account must allow the entire 'developers' account (using its root ARN) to assume the role. When an IAM user in the developers account calls sts:AssumeRole, AWS evaluates the trust policy; specifying the root ARN of the developers account (arn:aws:iam::123456789012:root) delegates trust to the entire account, and the individual user's permissions are then controlled by an IAM policy attached to the user or a group that grants sts:AssumeRole for this role.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.