Secure Deployment and Resource Sharing Across Accounts
Within Domain 6 of the SCS-C03 exam, secure deployment and resource sharing across accounts focuses on governing a multi-account AWS environment so that infrastructure is provisioned consistently and shared resources follow least privilege. Secure Deployment: AWS Organizations is the foundation, grouping accounts into organizational units (OUs) that separate workloads such as security, logging, production, and development. AWS Control Tower automates a landing zone with preventive controls (service control policies), detective controls (AWS Config rules), and proactive controls (CloudFormation hooks). Service control policies (SCPs) set maximum permissions for principals in member accounts, and resource control policies (RCPs) set maximum permissions on resources. Examples include denying the disabling of CloudTrail or restricting usage to approved Regions. Infrastructure as code using AWS CloudFormation StackSets deploys standardized baselines, such as IAM roles, GuardDuty, and Config recorders, to many accounts and Regions at once. AWS Service Catalog lets administrators publish preapproved, hardened products so teams self-provision compliant resources. Cross-account CI/CD pipelines use dedicated deployment roles, KMS-encrypted artifact buckets, and tools such as cfn-guard or CloudFormation Guard to scan templates before release. Resource Sharing: AWS Resource Access Manager (RAM) shares resources such as VPC subnets, Transit Gateways, Route 53 Resolver rules, and License Manager configurations with specific accounts, OUs, or the entire organization, avoiding resource duplication. Resource-based policies on S3 buckets, KMS keys, SQS queues, Lambda functions, and Secrets Manager secrets grant cross-account access; the condition key aws:PrincipalOrgID limits access to organization members. For KMS, both the key policy in the owning account and IAM policies in the consuming account must allow access. Cross-account IAM roles with trust policies, plus an external ID for third parties, prevent the confused deputy problem. Governance Tools: Delegated administrator accounts centralize Security Hub, GuardDuty, Macie, and Firewall Manager. IAM Access Analyzer identifies resources shared outside the zone of trust, helping teams validate that cross-account sharing remains intentional and auditable.
Secure Deployment and Resource Sharing Across Accounts
In a multi-account AWS environment, teams need to deploy infrastructure consistently and share resources such as subnets, AMIs, KMS keys, snapshots, Transit Gateways and S3 data across account boundaries. Secure Deployment and Resource Sharing Across Accounts is the set of AWS services, patterns and policy controls that make this possible while keeping least privilege, central governance and a clear audit trail. It is a core topic of the Management and Security Governance domain of the AWS Certified Security - Specialty exam.
Why It Is Important
• Blast radius reduction: AWS recommends separate accounts for workloads, security tooling, logging and shared services. Separation only works if sharing between accounts is controlled.
• Consistency and compliance: Guardrails, baselines and security tooling must be deployed the same way into every account, including new ones.
• Cost and operational efficiency: Sharing a VPC, Transit Gateway or License Manager configuration avoids duplicating resources in every account.
• Data protection: Poorly scoped sharing, such as a public AMI or a snapshot shared with the wrong account, is a common cause of data exposure.
• Auditability: Central deployment and sharing create a single place to review who has access to what, which simplifies audits.
What It Is: The Key Building Blocks
1. AWS Organizations
• Groups accounts into Organizational Units (OUs) and enables all features, including policies.
• Service Control Policies (SCPs) set the maximum permissions for IAM principals in member accounts. They never grant permissions and do not affect the management account.
• Resource Control Policies (RCPs) set the maximum permissions on resources (for example S3, KMS, SQS, Secrets Manager, STS) in member accounts, which helps build a data perimeter regardless of which principal calls the resource.
• Declarative policies enforce a durable baseline configuration for services such as EC2 (for example, blocking public AMI sharing or enforcing IMDSv2).
• Delegated administrator: Lets a member account (typically a Security Tooling account) administer services such as GuardDuty, Security Hub, Macie, Inspector, Config, Firewall Manager, CloudFormation StackSets and IAM Access Analyzer, so the management account is used as little as possible.
• Trusted access: Allows an AWS service to perform actions across the organization on your behalf.
2. AWS Resource Access Manager (RAM)
• Shares supported resources with specific accounts, OUs or the entire organization.
• Common shareable resources: VPC subnets, Transit Gateways, Route 53 Resolver rules, Network Firewall policies, License Manager configurations, AWS Private CA, Aurora DB clusters, Prefix lists, IPAM pools, Glue catalogs, Outposts and more.
• When sharing within an organization with sharing with AWS Organizations enabled, invitations are not required. Sharing with accounts outside the organization requires the recipient to accept an invitation.
• Managed permissions (AWS managed or customer managed) define which actions consumers can perform on the shared resource.
• Owners retain ownership; consumers can use the resource but cannot delete or modify what they do not own. In VPC sharing, participants create their own resources (EC2, RDS, Lambda) in shared subnets but cannot modify the VPC, subnets, route tables or NACLs owned by the owner account.
• You can block external sharing with the RAM setting and with SCP condition keys such as ram:AllowsExternalPrincipals.
3. Resource-Based Policies
• Services like S3, KMS, SQS, SNS, Lambda, Secrets Manager, ECR, EventBridge and API Gateway support policies attached to the resource itself.
• Cross-account access generally needs both sides to allow it: the resource policy in the owning account and an IAM identity policy in the calling account. (Exception to remember: for some services, if the resource policy names a specific IAM principal ARN, that principal still needs an identity policy in its own account; account-level trust always requires the account to delegate.)
• Use the condition key aws:PrincipalOrgID to allow every principal in your organization, rather than listing account IDs. Use aws:PrincipalOrgPaths to scope to specific OUs.
• Use aws:ResourceOrgID in identity policies or VPC endpoint policies to make sure principals only reach resources that belong to your organization.
• Use aws:SourceAccount, aws:SourceArn and aws:SourceOrgID to prevent the confused deputy problem when AWS services act on your behalf.
4. Cross-Account IAM Roles
• The trust policy of a role in the target account names the source account or principal, and the source principal calls sts:AssumeRole.
• For third parties, require an ExternalId in the trust policy to prevent the confused deputy problem.
• Add conditions such as aws:MultiFactorAuthPresent, aws:PrincipalOrgID or source IP to tighten trust.
• Session policies and permission boundaries further restrict what an assumed session can do.
• IAM Identity Center with permission sets is the preferred method to give workforce users access to many accounts; it provisions roles in each assigned account.
5. Sharing Encrypted Resources With AWS KMS
• AWS managed keys (aws/ebs, aws/rds, aws/s3) cannot be shared across accounts because you cannot edit their key policies.
• To share encrypted EBS snapshots, RDS snapshots, AMIs or S3 objects, use a customer managed key. Add the target account to the key policy and give the target principals IAM permissions for actions such as kms:Decrypt, kms:DescribeKey, kms:CreateGrant and kms:ReEncrypt*.
• Typical workflow for an encrypted snapshot: re-encrypt it with a customer managed key if needed, share the key, share the snapshot, then the target account copies the snapshot and re-encrypts it with its own key.
• Grants are an alternative for temporary, programmatic delegation of key use.
• Multi-Region keys help when encrypted data must be shared or replicated across Regions.
6. Sharing AMIs and Snapshots
• Share with specific account IDs, organizations or OUs by modifying launch permissions; avoid public sharing.
• Enable Block Public Access for AMIs and Block Public Access for EBS snapshots at the account level, and enforce them with declarative policies or SCPs.
• Use EC2 Image Builder to create hardened golden AMIs and distribute them to target accounts and Regions, with launch permissions scoped to the organization.
• Use Allowed AMIs settings to restrict which AMI providers accounts can launch from.
7. Secure Deployment Tooling
• CloudFormation StackSets deploy a single template into many accounts and Regions. With service-managed permissions and Organizations integration, StackSets can automatically deploy to new accounts added to a target OU. With self-managed permissions, you create the AWSCloudFormationStackSetAdministrationRole and AWSCloudFormationStackSetExecutionRole yourself.
• AWS Control Tower builds a landing zone with a Log Archive account, an Audit account, preventive controls (SCPs, RCPs), detective controls (Config rules) and proactive controls (CloudFormation Hooks). Account Factory and Account Factory for Terraform (AFT) vend new accounts with baselines. Customizations for Control Tower (CfCT) add your own templates and SCPs.
• AWS Service Catalog lets central teams publish approved, pre-hardened products in portfolios shared with other accounts or the organization. A launch constraint assigns an IAM role used to provision the product, so end users do not need broad permissions.
• AWS Firewall Manager centrally deploys WAF rules, Shield Advanced protections, security groups, Network Firewall and DNS Firewall policies across accounts, including new ones.
• CodePipeline cross-account deployments use a pipeline in a tooling account, an artifact S3 bucket encrypted with a customer managed KMS key, and cross-account roles in the target accounts that CodePipeline or CodeBuild assumes. Both the S3 bucket policy and the KMS key policy must allow the target accounts.
• Systems Manager features such as Quick Setup, Automation in multiple accounts and Regions, and shared SSM documents support secure operational deployment.
8. Visibility and Monitoring of Sharing
• IAM Access Analyzer with the organization as the zone of trust finds resources shared outside the organization (S3, KMS, IAM roles, Lambda, SQS, Secrets Manager, snapshots, ECR and more). It also offers unused access analysis and policy validation, and custom policy checks for CI/CD pipelines.
• AWS Config aggregators and conformance packs evaluate configuration across accounts.
• CloudTrail organization trails record RAM, STS and KMS activity from all accounts into a central Log Archive bucket.
• Security Hub aggregates findings in the delegated administrator account.
How It Works: A Typical Secure Multi-Account Flow
1. The management account enables AWS Organizations with all features and turns on trusted access for RAM, StackSets, Config and the security services.
2. Security services are delegated to a Security Tooling account; logging goes to a Log Archive account.
3. SCPs and RCPs establish guardrails, for example preventing disabling of CloudTrail, blocking leaving the organization, restricting Regions and blocking sharing outside the organization.
4. A Network account owns the VPCs and Transit Gateway and uses RAM to share subnets and attachments with workload OUs.
5. A Shared Services account builds golden AMIs with Image Builder, encrypts them with a customer managed KMS key, and shares both the AMI and the key with the organization using aws:PrincipalOrgID.
6. StackSets with service-managed permissions deploy baseline IAM roles, Config rules and logging settings to every account in target OUs, automatically covering new accounts.
7. A tooling account runs CI/CD pipelines that assume tightly scoped deployment roles in workload accounts.
8. IAM Access Analyzer, Config and CloudTrail continuously detect unintended sharing and drift.
Common Scenarios and Correct Solutions
• Share an encrypted RDS snapshot with another account: Use a customer managed key, update its key policy for the target account, share the snapshot, and have the target copy it.
• Allow every account in the organization to read an S3 bucket: Bucket policy with aws:PrincipalOrgID, not a list of account IDs that must be maintained.
• Centralize networking while letting app teams launch instances: VPC sharing with AWS RAM.
• Deploy security baselines to all current and future accounts: StackSets with service-managed permissions and automatic deployment, or Control Tower with CfCT.
• Prevent anyone from sharing resources outside the organization: SCP denying RAM shares with external principals, plus disabling external sharing and enforcing image and snapshot block public access.
• Let developers deploy only approved infrastructure: Service Catalog portfolios with launch constraints.
• Give a third-party vendor access: Cross-account role with an ExternalId condition.
• Detect resources shared outside the organization: IAM Access Analyzer with organization zone of trust.
• Prevent data exfiltration to buckets outside the organization: VPC endpoint policy or SCP using aws:ResourceOrgID.
Exam Tips: Answering Questions on Secure Deployment and Resource Sharing Across Accounts
• Look for the keyword 'encrypted' first. If a shared snapshot, AMI or object is encrypted with an AWS managed key, the answer almost always involves re-encrypting with a customer managed key and updating the key policy.
• Prefer organization-wide conditions over account lists. When the question says 'all accounts in the organization' or 'future accounts', choose aws:PrincipalOrgID, OU targets, or organization-level sharing.
• 'New accounts automatically' points to StackSets service-managed permissions, Control Tower Account Factory, or Firewall Manager. Self-managed StackSets do not auto-deploy to new accounts.
• Remember SCP behaviour: SCPs only restrict, never grant, and they do not apply to the management account or to service-linked roles. If a question asks why an action is still allowed in the management account, this is the reason.
• Know when RAM is the answer. Subnets, Transit Gateways, Resolver rules, Private CA, License Manager and Network Firewall policies are shared with RAM. S3 buckets and KMS keys use resource-based policies instead.
• VPC sharing ownership rules are a favourite trap: participants cannot modify the owner's VPC components, and each account owns and is billed for the resources it creates.
• Cross-account access needs two sides of permission. If one answer only updates the bucket policy or only updates the IAM policy, check whether the other side is also needed. For KMS, both the key policy and the IAM policy in the target account matter.
• Confused deputy hints: 'third party', 'vendor', or 'SaaS provider' means ExternalId; 'AWS service writing to my bucket or topic' means aws:SourceArn or aws:SourceAccount.
• Least management account usage: Choose delegated administrator for security services rather than running them from the management account.
• Detective versus preventive: Access Analyzer and Config detect; SCPs, RCPs, declarative policies and block public access settings prevent. Read whether the question asks to prevent or to detect.
• Least operational overhead usually means a managed, organization-integrated feature (Control Tower, StackSets service-managed, RAM organization sharing, Firewall Manager) over custom Lambda scripts.
• CI/CD questions: A cross-account pipeline fails most often because the artifact bucket uses the default S3 key or the KMS key policy lacks the target account role. The fix is a customer managed key shared with the deployment roles.
• Service Catalog launch constraints are the answer when users must deploy resources they lack IAM permissions to create.
• Eliminate answers that make resources public (public AMIs, public snapshots, Principal '*' with no conditions) unless the scenario explicitly requires public access.
• Read for scope words: 'specific account' suggests explicit account ID sharing; 'specific OU' suggests aws:PrincipalOrgPaths or RAM OU sharing; 'entire organization' suggests aws:PrincipalOrgID or organization sharing.
Summary
Secure cross-account deployment and sharing rely on AWS Organizations for structure and guardrails, AWS RAM and resource-based policies for controlled sharing, customer managed KMS keys for encrypted data, cross-account roles and IAM Identity Center for access, and StackSets, Control Tower, Service Catalog and Firewall Manager for consistent deployment. Access Analyzer, Config and CloudTrail provide continuous visibility. On the exam, identify whether the scenario is about encryption, scope, automation for new accounts, prevention versus detection, and operational overhead, then pick the managed, least-privilege, organization-aware option.