AMI Watermarks: Image Governance at Financial-Grade Scale
Listen to article
Fernando's voiceFernando · 18:04
Powered by Amazon Polly + OmniVoice
AMI Watermarks arrive in EC2 as a provenance primitive that persists across cross-region copies, cross-account sharing, and new AMI creation from running instances. For financial environments with hundreds of accounts and dozens of regions, this solves a problem that tag scripts and SCPs partially addressed — but never reliably. In this article, I walk through the migration journey from an ad hoc model to an auditable chain of custody.
For years, AMI governance in multi-account environments was solved with workarounds: tags that vanish when an AMI is copied across regions, Lambda scripts attempting to re-apply metadata, and SCPs that block launches by owner ID but cannot distinguish an audited image from an unauthorized derivative. AMI Watermarks change this equation by making provenance an immutable, hereditary attribute of the image itself.
The Starting Point: Fragile Tracking in a Regulated Environment
In a typical financial environment with 200+ AWS accounts organized across multiple OUs — production, sandbox, DR, by line of business — the lifecycle of a golden AMI involves at least four hops: build in the tooling account, copy to the shared image account, distribute to workload accounts across up to 6 regions, and eventual creation of derivative AMIs from running instances during patching windows. Each hop was a traceability break point.
AWS tags, by design, are not automatically copied when you run CopyImage across regions or accounts. This means any tag-based governance scheme requires a secondary process — typically a Lambda function triggered by EventBridge listening for CopyImage events and attempting to re-apply the original tags. This pattern has three known failure modes: race conditions between copy completion and event firing, IAM permissions that must exist in every target account for the Lambda to write tags, and complete absence of coverage for AMIs created via CreateImage from running instances — a legitimate and frequent use case in patching pipelines.
The practical result was a growing discrepancy between what the CMDB said and what was actually running in production. In PCI-DSS and SOC 2 audits, the question 'prove this instance was launched from an approved image' required manual queries crossing CloudTrail, EC2 Inventory, and spreadsheets maintained by the platform team. That is not governance — that is archaeology.
What AMI Watermarks Actually Are (and What They Are Not)
An AMI watermark is an identifier you attach to a private AMI that automatically persists in every AMI derived from it — whether via CopyImage, or via CreateImage from a running instance that was launched with the original AMI. The watermark carries structured metadata: source AMI ID, owner ID, source region, and creation timestamps. It remains visible even when the AMI is shared with other accounts.
The mechanism is fundamentally different from tags. Tags are control-plane metadata that you manage; watermarks are attributes of the image itself, propagated by the EC2 service as part of the copy or derivation operation. You do not need a reconciliation Lambda, you do not need extra permissions in destination accounts for the watermark to exist — it is already there.
What watermarks are not: they are not a cryptographic signature of the image content. They do not detect whether the filesystem inside the AMI was tampered with after creation. For that, you still need OS-level integrity verification — Nitro Trusted Platform Module, UEFI Secure Boot, or package hash validation via AWS Inspector. Watermarks solve the provenance and lineage problem; they do not replace content integrity verification. This distinction is critical in financial environments where both controls are required and audited separately.
The Migration Journey: From Ad Hoc Model to Auditable Chain of Custody
- 1
Phase 1 — Inventory and Classification of Existing AMIs
Before applying watermarks, you need to know what exists. Use
aws ec2 describe-images --owners selfin each account and region, aggregate via AWS Config with a custom rule or via Resource Explorer with an aggregator index in the management account. Classify AMIs into three categories: (1) golden images built by the official pipeline, (2) derivative AMIs with known lineage, (3) AMIs of unknown or untracked origin. The third category is the risk you are addressing. In mature environments, it typically represents 20-40% of the total inventory — images created manually by development teams, AMIs imported from on-premises workloads, or snapshots promoted to AMI without going through the pipeline. - 2
Phase 2 — Watermark Integration in the Image Builder Pipeline
EC2 Image Builder supports watermark attachment as part of the build pipeline. Configure the watermark in the pipeline definition with an identifier that encodes governance context: for example,
golden-linux-cis-hardened-v3-2026Q2. The watermark is applied to the output AMI before distribution. Then configure distribution to multiple regions and accounts — the watermark propagates automatically in each copy. This eliminates the reconciliation Lambda and EventBridge workaround. The Image Builder pipeline should run in the tooling account within the infrastructure OU, with distribution permissions configured via RAM (Resource Access Manager) or direct AMI sharing. - 3
Phase 3 — Enabling Allowed AMIs with Watermark Filter
Allowed AMIs is the account-level setting that restricts which AMIs can be discovered and used to launch instances. With the addition of watermark parameters (announced in September 2025), you can configure the policy to allow only AMIs carrying a specific watermark. The configuration is done via
aws ec2 modify-image-block-public-accessand related APIs. For at-scale enforcement, use Declarative Policies in AWS Organizations — this applies the Allowed AMIs restriction to all accounts in an OU without per-account configuration. Audit mode allows you to monitor violations before enforcing, which is essential for a migration without service disruption. - 4
Phase 4 — Remediation of Unknown-Origin AMIs
AMIs in category 3 (unknown origin) cannot receive watermarks retroactively in a way that represents genuine provenance — applying a watermark to an AMI that did not go through the pipeline does not make it trusted. The correct strategy is: (a) identify which production instances are running from these AMIs via
aws ec2 describe-instancesfiltered byimage-id, (b) re-platform those instances to approved AMIs within a maintenance window, (c) deregister the untracked AMIs after confirming no instances use them anymore. For on-premises-imported AMIs representing legitimate workloads, the path is to rebuild them via Image Builder with the same content, now with the watermark applied at the source. - 5
Phase 5 — Observability and Drift Alerts
After enforcement, the work does not end. Configure a custom AWS Config rule that checks whether every running EC2 instance was launched from an AMI with an approved watermark. Combine with CloudTrail Insights to detect anomalous instance launch patterns — for example, an unusual volume of
RunInstancesin an account that normally has low activity. Use EventBridge to routeRunInstancesevents with non-watermarked AMIs to an SNS topic that triggers an automated remediation workflow via Step Functions: notification to the security team, tagging the instance as non-compliant, and — in high-security environments — automatic termination after a quarantine window. This loop closes the governance cycle.
AMI Governance Pipeline with Watermarks — Multi-Account Lineage Flow
Shows how a watermark applied in the tooling account propagates through regional copies, cross-account sharing, and runtime derivations, and how Allowed AMIs + Declarative Policies close the enforcement loop.
- EC2 Image Builder · Pipeline
- AMI Watermark · Attach (origin)
- Golden AMI · + Watermark
- CopyImage · Region B
- Shared AMI · Workload Account
- RunInstances · (EC2 Instance)
- CreateImage · (from running instance)
- Derived AMI · + Inherited Watermark
- Allowed AMIs · + Watermark Filter
- Declarative Policies · (AWS Organizations)
- AWS Config Rule · + CloudTrail Alert
Integrating Watermarks with the Existing Security Chain
Watermarks do not operate in isolation — they fit into a control chain that, in financial environments, already includes multiple layers. The most important integration is with IAM: you can create IAM policy conditions that check EC2 resource attributes, but watermarks themselves are not native IAM conditions yet — enforcement happens via Allowed AMIs, not via aws:ResourceTag. This means the blocking layer is the EC2 control plane, not the IAM evaluator. Understanding this distinction matters for threat modeling: a principal with ec2:RunInstances permission in an account where Allowed AMIs is configured with a watermark filter cannot launch an instance from an unapproved AMI, even if they have explicit IAM permission to do so.
Integration with AWS Security Hub is the natural next step. Configure custom findings that correlate instances without an approved watermark with the Security Hub controls framework — mapping to CIS AWS Foundations Benchmark or PCI-DSS controls as applicable. This creates a unified audit trail that the compliance team can consume without needing to understand watermark implementation details.
For environments using HashiCorp Packer or custom build pipelines outside Image Builder, integration requires an additional step: after building and registering the AMI, calling the watermark API via CLI or SDK before distribution. This can be encapsulated in a Terraform module or a reusable GitHub Actions action, ensuring no build pipeline produces AMIs without a watermark.
Cost, Quota, and At-Scale Operational Considerations
AMI Watermarks are available at no additional cost in all AWS regions, including GovCloud and the China regions operated by Sinnet and NWCD. The real cost of adoption is not licensing — it is operational: engineering time to migrate existing pipelines, maintenance windows to re-platform instances running on untracked AMIs, and the opportunity cost of keeping audit mode active long enough before enforcement.
In terms of quotas, the relevant limit is the number of AMIs per account per region — currently 50,000 private AMIs per region, which is rarely a bottleneck in well-managed financial environments with active deprecation policies. What matters more is watermark propagation latency in CopyImage operations: since cross-region AMI copying can take minutes to hours depending on snapshot size, the watermark will only be available on the destination AMI after the copy completes. Pipelines that query watermarks immediately after initiating a copy need to implement polling with exponential backoff or use EventBridge to wait for the copy completion event before validating.
For organizations with hundreds of accounts, the initial inventory cost is non-trivial. Resource Explorer with an aggregator index in the management account reduces this significantly — a single query can return all AMIs across all accounts and regions with their watermarks. Configure the aggregator index with type AGGREGATOR in the management account and LOCAL indexes in each member account. Resource Explorer's update latency is approximately 15 minutes, which is acceptable for governance use cases but not for real-time enforcement — for that, use the EC2 API directly.
Before and After: Measurable Migration Impact
Real Risks to Manage During Migration
1. Premature enforcement mode causes service disruption. Enabling Allowed AMIs with a watermark filter before ensuring all AMIs in use have a watermark results in RunInstances failures for Auto Scaling Groups, CI/CD pipelines, and any automation that launches instances. Use audit mode for at least 2-4 weeks and monitor findings before switching to enforce mode. 2. Third-party or AWS Marketplace shared AMIs will not have your watermark. Workloads using Marketplace AMIs need a separate strategy — either you exclude those AMIs from the watermark filter (creating a documented exception), or you rebuild the images via Image Builder using Marketplace AMIs as the base and applying your watermark at the customization layer. 3. Watermarks are not content integrity controls. An AMI with a valid watermark that was modified after creation (for example, via direct EBS snapshot access) will still pass the Allowed AMIs filter. Combine watermarks with AWS Inspector for vulnerability scanning and with Nitro Trusted Platform Module policies for boot integrity verification on critical instances.
AMI Governance Approaches: Technical Comparison
| Criterion | EC2 Tags + Lambda | SCPs by Owner ID | AMI Watermarks + Allowed AMIs | |
|---|---|---|---|---|
| Persistence across CopyImage | ❌ No — requires reconciliation | ✅ Yes — owner does not change | ✅ Yes — native | — |
| Persistence across CreateImage from instance | ❌ No | ❌ No — owner changes to creating account | ✅ Yes — watermark inherited | — |
| Launch enforcement | ❌ Not native | ⚠️ Partial — by owner, not by lineage | ✅ Yes — Allowed AMIs + Declarative Policies | — |
| Scale to 200+ accounts | ❌ Lambda in each account | ✅ Centralized SCP | ✅ Centralized Declarative Policies | — |
| Full lineage traceability | ⚠️ Partial — depends on tagging discipline | ❌ No — owner ID does not carry lineage | ✅ Yes — origin AMI ID, owner, region, timestamp | — |
AMI Watermarks Through the AWS Well-Architected Lens
Security
Watermarks + Allowed AMIs implement the least-privilege principle at the image plane: only images with verified provenance can be used to launch instances. This reduces the attack surface from untracked images that may contain unpatched vulnerabilities or unauthorized software. The combination with Declarative Policies ensures the control cannot be bypassed in individual accounts.
Reliability
Allowed AMIs enforcement prevents instance launches from unapproved images, which in financial environments can include images with incorrect network configurations or missing monitoring agents — sources of reliability incidents that are difficult to diagnose.
If I were implementing this today in a regulated financial environment, I would start with the Resource Explorer inventory before touching any pipeline — the surprise of how many unknown-origin AMIs exist in production is always larger than the platform team estimates, and that discovery needs to happen before any conversation about enforcement windows. The hardest lesson I have learned in governance migrations is that audit mode is not a temporary phase — it is a permanent sensor; keep it active even after enforcement is in place, because it captures bypass attempts that enforcement blocks but does not record with sufficient context. Finally, watermarks solve provenance but do not replace a reproducible and verifiable build process — invest in EC2 Image Builder with CIS hardening pipelines and integrated Inspector scanning, because a watermark on a poorly built image is just a stamp on a problematic document.
Verdict: Adopt, But With the Right Sequence
AMI Watermarks are a genuinely useful addition to the EC2 image governance toolkit — not because they solve a new problem, but because they solve an old problem natively and reliably where before there were only fragile workarounds. For financial environments with provenance audit requirements, the combination of Watermarks + Allowed AMIs + Declarative Policies closes a real gap that SCPs and tags never fully closed. The adoption sequence matters: inventory first, build pipeline integration second, audit mode third, enforcement fourth. Skipping steps — especially going directly to enforcement without complete inventory — is the most common cause of service disruptions in image governance migrations. The zero adoption cost removes the economic barrier; the operational risk of a poorly sequenced migration is the only reason not to start today.
References
Architecture, AWS, AI and market deep dives — straight to your inbox. Free.
No spam · unsubscribe anytime
Ask Fernando about this
Get a focused answer about this article from my AI assistant, grounded in my work.
Join the conversation
Sign in to comment
Verify your email to join in — you'll also get the newsletter. No password.
Keep reading
Architecture intelligence, in your inbox
Curated signals and original analysis on AWS, AI, distributed systems and the market — the way a solutions architect reads them.
- Curated AWS · AI · architecture · market signals
- New architecture studies & deep-dives when they ship
- Sharp summaries — depth without the noise
- No spam · double opt-in · unsubscribe anytime