Cloud concept · Updated

Cross-Account Access - Cross-account access lets a human, application, or system in one cloud account use explicitly authorized resources or roles in another account.

In short

Cloud accounts create administrative and security boundaries, but shared services, deployment pipelines, and operational teams often need controlled access across them. Cross-account access establishes that authorization without requiring shared credentials or moving resources into the same account.

Cloud Concepts Hub →

6 key aspects of Cross-Account Access

Effective cross-account access combines explicit trust, narrowly scoped permissions, temporary credentials, contextual restrictions, and ongoing validation.

01
Explicit authorization across account boundaries

Define which external identities can perform which actions on which resources. Account ownership, organization membership, and network reachability do not independently grant access.

02
Trust and permissions serve different purposes

A role trust policy determines who may obtain a role session, while the role's permissions determine its capabilities. Diagnose role-assumption failures separately from authorization failures after assumption.

03
Temporary, attributable credentials

Prefer federation and workload roles over shared long-lived access keys. Use session names and source identity where supported to connect destination-account activity to the originating user or workload.

04
Policy evaluation spans multiple controls

Evaluate identity policies, resource policies, applicable organizational controls, permissions boundaries, and session restrictions. Check dependent resources such as encryption keys instead of assuming that access to the primary resource is sufficient.

05
Conditional and least-privilege delegation

Constrain access using specific principals, resource scopes, and supported context conditions. Use external IDs for appropriate third-party integrations and source-account or source-resource conditions for supported service-principal integrations.

06
Continuous validation and lifecycle management

Review external grants, test negative cases, and monitor cross-account activity. Plan for session expiration and revocation because changing trust alone does not necessarily invalidate credentials already issued.

Cloud services for Cross-Account Access

IAM establishes cross-account trust and permissions, while STS supplies the temporary credentials used to act through destination roles. S3 illustrates direct resource-policy access, and KMS adds an independent authorization requirement when shared data is encrypted with a customer managed key. IAM Roles Anywhere extends temporary-credential patterns to external workloads. Verified Permissions can evaluate application-level access rules, but the application must enforce those decisions and still satisfy IAM authorization for AWS operations. Together, these services separate identity establishment, credential issuance, infrastructure permissions, and application authorization rather than treating one policy as sufficient for every layer.

Amazon S3Amazon S3

S3 bucket policies can authorize principals from other accounts to access specified objects or bucket operations. Cross-account designs must also consider caller permissions, Object Ownership settings, and encryption-key authorization.

Amazon Verified Permissions

Verified Permissions evaluates fine-grained application authorization policies, including application-defined account or tenant relationships. Its authorization decisions are separate from the IAM permissions and trust relationships required to call AWS APIs across accounts.

Cross-Account Access exam questions

Real practice exam questions on Cross-Account Access, with the correct answer and its explanation. Answer them with every option in the exam simulator.

MLA-C02 (beta)

A model-governance team in AWS account A publishes a model artifact at s3://governed-models/releases/risk-v7/model.tar.gz. An automated evaluation application in account B runs with an IAM role named ModelEvaluator and must download this artifact by using its existing role credentials. The application does not need to list the bucket or access any other objects, and it must not assume a different role.

The bucket uses S3 Object Ownership with bucket owner enforced and SSE-S3 encryption. Neither the ModelEvaluator role nor the bucket policy currently grants access to the artifact. No explicit denies or other policy restrictions apply.

Which configuration grants the required cross-account access with least privilege?

Show answerCORRECT ANSWER

Attach an identity policy to ModelEvaluator allowing s3:GetObject on the artifact's exact object ARN. Add a bucket policy allowing the same action on that object ARN with the ModelEvaluator role ARN as the principal.

Direct cross-account S3 access requires authorization from both the caller's account and the resource owner's account. These policies authorize only ModelEvaluator to retrieve the specified artifact without granting listing, write, or unrelated object access. SSE-S3 does not require additional KMS permissions.

SAP-C03

A company aggregates application logs from its workload accounts through CloudWatch Logs subscriptions into an Amazon S3 bucket in a dedicated archive account. A security account runs investigation tools by using an IAM role named LogInvestigator. The tools must read archived objects directly with this role's credentials, without assuming a role in the archive account.

The archive bucket policy allows the security account principal, arn:aws:iam::222222222222:root, to perform s3:GetObject on arn:aws:s3:::central-log-archive/workloads/*. The security account's administrators are responsible for deciding which local identities can read these objects. The LogInvestigator role currently has only s3:ListBucket permission for the archive bucket, restricted to the workloads/ prefix. Listing succeeds, but downloading an existing object returns AccessDenied.

The bucket uses S3 Bucket owner enforced Object Ownership, and the objects use SSE-S3 encryption and are immediately retrievable. No applicable policy contains an explicit deny, and no permissions boundary, session policy, or Organizations policy restricts the requests.

Which change will allow the downloads while preserving the existing delegation model and least privilege?

Show answerCORRECT ANSWER

Attach an identity-based policy to LogInvestigator that allows s3:GetObject on arn:aws:s3:::central-log-archive/workloads/*. Keep the existing bucket policy.

The bucket owner has authorized the security account to access the objects. The security account can delegate that permission to LogInvestigator through an identity-based policy. Together, the bucket policy and role policy authorize cross-account reads, scoped to the required object prefix.

SOA-C03

A company runs maintenance automation in a central operations AWS account. The automation assumes MaintenanceRole in a production account and uses the returned temporary credentials to update an existing AWS CloudFormation stack.

The UpdateStack request fails with AccessDenied. A CloudOps engineer verifies the following configuration:
• The central automation role allows sts:AssumeRole on MaintenanceRole and cloudformation:UpdateStack on the production stack.
• MaintenanceRole trusts the central automation role, but its permissions policy allows only CloudFormation Describe and List actions.
• GetCallerIdentity confirms that the failed request uses a MaintenanceRole session in the production account.
• The stack's existing CloudFormation service role has all permissions required to provision the updated resources.
• No session policies, permissions boundaries, SCPs, or explicit denies restrict the request. All other required permissions are configured.

Which change will allow the automation to update the stack while maintaining least privilege?

Show answerCORRECT ANSWER

Add cloudformation:UpdateStack permission for the specific production stack ARN to MaintenanceRole's permissions policy.

After role assumption, the automation's requests are authorized using the production MaintenanceRole session, not the central automation role's permissions. Granting UpdateStack on the designated stack to MaintenanceRole supplies the missing permission without granting access to unrelated stacks.

Practice Cross-Account Access in a full exam

Questions on Cross-Account Access in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Cross-Account Access

3 min read

Cross-account access connects identities and resources across independently administered cloud accounts. Typical examples include a deployment pipeline updating production infrastructure, a security team inspecting application accounts, and an analytics application reading data owned by another business unit. The objective is to preserve account isolation while granting specific capabilities to identified callers under defined conditions. Network connectivity alone does not provide this authorization, and belonging to the same organization does not automatically establish access.

Two common implementation patterns are assuming a role in the destination account and granting an external principal access through a resource policy. With role assumption, the caller obtains temporary credentials representing a destination-account role. With direct resource access, the caller keeps its existing identity while the resource owner authorizes it. Choose according to the service's policy support, the operations required, and whether centralized destination-account permissions simplify administration.

In AWS, cross-account role assumption normally requires an identity policy in the source account permitting sts:AssumeRole on the target role and a trust policy on that role accepting the caller. The trust policy controls who can assume the role; the role's permissions policies control what the resulting session can do. Trusting an account principal delegates authority to that account's administrators rather than granting every identity in that account automatic access. For example, a development pipeline can assume a production deployment role whose permissions allow updates only to a designated application.

After assumption, requests use the destination role's session, not the original caller's permissions. Session policies can further restrict that session, while applicable permissions boundaries, service control policies, resource control policies, resource policies, and explicit denies can affect authorization. An allow in one policy does not override an applicable explicit deny. Troubleshooting should therefore distinguish a failed AssumeRole request from a successful assumption followed by a denied resource operation.

For direct cross-account resource access, AWS generally requires permission from both the caller's account and the resource-owning account. For example, reading another account's S3 object generally requires an identity-policy allow for the reader and a bucket-policy allow for that principal. If the object is encrypted with a customer managed KMS key, the caller also needs the relevant KMS permissions, and the key policy must permit the cross-account use. Access to the bucket does not implicitly grant access to its encryption key.

Conditions make trust narrower and more practical. Restrict principals, actions, resources, and, where supported, organization membership or principal attributes. Require MFA for appropriate human workflows. For third-party role assumption, an external ID helps prevent confused-deputy attacks, but it is not a secret or a substitute for a trusted principal. For supported AWS service-to-service requests, source-account and source-resource conditions help prevent unintended use of a service principal.

Human users should generally enter through federation and obtain short-lived role sessions. Applications running in AWS should use workload roles rather than embedded access keys. External servers can use IAM Roles Anywhere to obtain temporary credentials using trusted X.509 certificates; a separate cross-account role assumption can then provide destination access when required. IAM paths organize identities and can support policy matching, but paths are not security boundaries. Amazon Verified Permissions addresses application-level authorization decisions; it does not replace IAM trust policies or grant access to AWS resources by itself.

The trade-off is additional policy coordination and operational complexity. Keep grants narrow, record role sessions with attributable names or source identity, inspect CloudTrail events, and use IAM Access Analyzer to identify unintended external access. Test both permitted and denied scenarios, including expired sessions and missing encryption permissions. Removing trust prevents new sessions, but existing temporary credentials may remain usable until expiration unless separately restricted or revoked through supported controls.

Learn Cross-Account Access in lessons

8 short lessons on Cross-Account Access in 7 certification courses.

and 2 more lessons

Open the lessons