Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.5.1.6. DevSecOps and Multi-Account Deployment Pipelines (Inspector, ECR Scanning, Signing, Cross-Account CodePipeline)

💡 First Principle: Build once, verify once, promote the same immutable artifact through every environment, and make each environment's account prove it trusts the artifact (scan results, signature) rather than trusting the pipeline that rebuilt it.

Security gates in the pipeline:
  • Scan before push (shift left): "Amazon Inspector" CI/CD integration runs the Inspector SBOM generator on the image in the build and sends the SBOM to the Inspector Scan API. It is available as the CodePipeline InspectorScan action and as Jenkins, TeamCity, GitHub Actions and GitLab integrations. The build can fail on a severity threshold before the image ever reaches a registry.
  • Scan in the registry: "Amazon ECR" basic scanning checks OS packages against the CVE database on push or on demand. Enhanced scanning (configured at registry level) hands repositories to Amazon Inspector for continuous scanning of OS and programming-language packages, re-evaluating stored images when new CVEs are published and emitting findings to "EventBridge". Choose enhanced when an image already in production must be re-flagged by a newly disclosed CVE.
  • Sign artifacts: "AWS Signer" signs container images using the Notation (Notary Project) format. ECR managed signing signs automatically on push from a registry-level signing rule (signing profile plus repository filters), with no client-side tooling; manual signing uses the Notation CLI with the Signer plugin. Verify at deploy time with an admission controller on EKS (for example Kyverno or Ratify with Gatekeeper and the Signer trust policy) so unsigned or tampered images never run. "Lambda" uses Signer through code signing configurations, which reject unsigned or untrusted ZIP packages.
Multi-account pipelines (tooling account pattern):
  • The pipeline lives in a central tooling account; deploy actions target dev, test and prod accounts. Each cross-account action carries a roleArn for a role in the target account that trusts the pipeline's service role, and "CloudFormation" deploy actions also pass a deployment role the stack runs as.
  • Artifact bucket encryption: the artifact bucket must use a customer managed KMS key whose key policy lets the target accounts' roles decrypt. The AWS managed key aws/s3 cannot be shared across accounts, which is the classic reason a cross-account deploy fails with access denied. The bucket policy must also grant the target roles access.
  • Cross-Region actions: each Region with an action needs its own artifact bucket and key (artifactStores map); CodePipeline copies the input artifacts across.
  • Artifact promotion: build and scan once in the tooling account, then deploy that same artifact (image digest, not a mutable tag) to each stage, with a manual approval or automated test gate before prod. Rebuilding per environment breaks the guarantee that what was tested is what runs. ECR cross-account or cross-Region replication can place the image next to each workload.
  • Rollback inside the pipeline: V2 pipelines support stage conditions: an entry condition can check a "CloudWatch" alarm and refuse to deploy while production is unhealthy, and an on-failure or on-success condition can roll back the stage to the last successful execution's artifacts. CodeDeploy alarms and the ECS deployment circuit breaker roll back inside a deployment; stage conditions roll back the pipeline stage.

⚠️ Exam Trap: "The cross-account deploy action fails with AccessDenied reading the artifact" almost always means the artifact bucket is encrypted with the default aws/s3 key (or the CMK's key policy omits the target account). Adding S3 bucket-policy permissions alone does not fix it, because the target role still cannot decrypt.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned