How do you organize CI/CD access across accounts?
AdvancedProductionMulti-Account and Landing Zone
Answer
One deploy role per target account, trusted only by the CI identity provider (GitHub OIDC, GitLab OIDC) or by a central tooling account role, with conditions pinning repo and branch or environment:
"Condition": {
"StringEquals": {"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"},
"StringLike": {"token.actions.githubusercontent.com:sub": "repo:acme/payments:environment:prod"}
}
Prod roles accept only the prod environment, which itself requires reviewers in GitHub. No static keys anywhere, and the deploy role has a permission boundary so it cannot create admin roles.
More on Multi-Account and Landing Zone
Why do production teams use many AWS accounts instead of one big account?BeginnerWhat does a typical OU structure look like for a mid-size company?IntermediateWhat should and should not live in the management account?BeginnerWhat does Control Tower give you that plain Organizations does not?IntermediateHow do you vend new accounts in a repeatable way?IntermediateHow do you design SCPs so they protect without blocking the platform team?Advanced