A municipal CI job running in account A must deploy CloudFormation stacks into account B. How should cross-account automation authenticate?
Select an answer to reveal the explanation.
Short Explanation
The pipeline in account A should knock and borrow a deployment badge from account B—not carry B’s long-lived keys in its pocket. A trusted cross-account role gives temporary deploy rights. Keys in plaintext or root passwords in logs are automation anti-patterns.
Full Explanation
Cross-account automation assumes a role in the target account using STS, with a trust policy that names the CI principal in the source account and a permissions policy limited to required CloudFormation and related actions. Storing long-lived keys or root credentials in the pipeline increases secret sprawl and audit risk. Anonymous API access is not a valid substitute for IAM authentication.