Cloud concept · Updated

Artifact Immutability - Artifact immutability means that once an artifact is published under a fixed identity, that identity cannot be reused for different content.

In short

An immutable artifact keeps the same content whenever it is retrieved by its fixed identity, such as a protected package version or a content digest. This lets teams deploy the exact output they tested, trace it back to its build, and roll back to a known version if it is still available.

Cloud Concepts Hub →

5 key aspects of Artifact Immutability

Artifact immutability gives each published identity fixed content, while promotion and retention policies determine where that content is deployed and how long it remains available.

01
Fixed artifact identity

Pin a content digest, an exact package version protected against reuse, or a specific object version. Treat moving labels as pointers, not as records of what was deployed.

02
Unique publication versions

Assign a distinct identity to each publishable build candidate and each corrected release. When retrying a publish, accept an existing artifact only after verifying that it matches the expected content.

03
Promotion without rebuilding

Test and approve a specific artifact, then deploy that artifact unchanged across environments. Record its fixed identity in the release manifest and deployment history.

04
Repository-side enforcement

Reject overwrites at the repository and restrict who can change publication policies. Verify deletion and identifier reuse separately, because blocking overwrites may not prevent either.

05
Independent retention policy

Retain deployed versions and approved rollback candidates for the required recovery window. Expire unused artifacts separately without reassigning their immutable identities.

Cloud services for Artifact Immutability

Use a package feed for versioned packages, a container registry for images, and versioned object storage for standalone deployment archives. A release that spans these services can record the exact package version and feed, image digest and repository, and object version ID and key in one release manifest. The pipeline uses that manifest for testing, approval, and deployment instead of resolving moving labels at each stage.

Repository controls prevent replacement, while retention and deletion controls determine whether each referenced artifact remains available for rollback. Configure both according to the service and artifact type.

Azure Artifacts

Azure Artifacts permanently reserves a package version once it is published to a feed, so deleting it does not permit reuse of that version in the same feed. Feed views let teams promote an existing package version without rebuilding it.

Azure Container Registry

Azure Container Registry supports pulling images by digest and applying write and delete controls to tags and manifests. Deployments can pin the digest while administrators protect approved images against unwanted updates or deletion.

Amazon S3Amazon S3

Amazon S3 Object Lock can protect an individual object version from deletion during a retention period or legal hold, subject to the lock mode and permissions. A pipeline should pin the object version ID because a new version can still be written under the same key.

What is Artifact Immutability

2 min read

Artifact immutability is a guarantee about the relationship between a published artifact and its identity. Once a package, container image, or deployment archive is published under an immutable identity, that identity must never resolve to different content. Even an emergency fix needs a new artifact identity, though it may go through a different approval process. Release notes, approval status, and other metadata outside the artifact can change without changing the artifact itself.

A pipeline versioning strategy should distinguish release labels from content identifiers. A package version such as 2.4.1 communicates release information, but it is immutable only if the repository prevents that package version from being replaced or reused. A container image digest identifies specific content, while a tag such as stable may point to different images over time. A source commit ID alone does not identify the build output: two builds from the same commit can produce different bytes if dependencies, base images, or tools change. Give each publishable build candidate a unique version or build identifier, and record its source revision and output digest or checksum. If a publish attempt is retried, verify that any existing artifact has the expected checksum before treating the retry as successful.

Build once and promote the same output across environments. For example, a pipeline can publish a container image, run integration tests against its digest, and deploy that digest to staging and production after approval. Pass environment-specific configuration at deployment or runtime where possible so promotion does not require a rebuild. If promotion copies an artifact to a different repository, verify that the destination serves the expected content before deploying it. Use moving labels for discovery or release status, but record and deploy the resolved identity rather than resolving the label again after testing.

Enforce the guarantee at the repository boundary rather than relying only on naming conventions. Check whether the repository blocks overwrites, whether a deleted identifier can be reused, and who can change those settings. For example, enabling versioning in object storage allows multiple versions under one object key; it does not stop an unversioned read from returning a newer archive. Pin the specific object version and verify its checksum when consuming that archive.

Immutability does not require retaining every build. Retention is a separate decision: keep deployed artifacts and rollback candidates for the required recovery window, and expire unused candidates according to storage and audit requirements. Rollback means redeploying a previously approved identity, not uploading its bytes under the current release version. Immutability also does not establish who built an artifact or whether it is safe. Verify signatures and provenance where publisher trust matters, and block compromised identities from future deployments rather than replacing their contents.

Artifact Immutability exam questions

Real practice exam questions on Artifact Immutability, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DVA-C03

A company publishes container images to a single private Amazon ECR repository. Developers use the dev-latest tag to pull the newest development build. Production deployment manifests reference version tags such as 2.8.0. An emergency build recently overwrote a version tag, causing an unchanged deployment manifest to pull different image content. The company must keep its tag-based deployment manifests and allow dev-latest to move. Amazon ECR must reject attempts to overwrite any other existing tag, even when the publisher has permission to push images. Publishers cannot delete images or change repository settings. Which configuration meets these requirements?

Show answerCORRECT ANSWER

Set the repository to `IMMUTABLE_WITH_EXCLUSION` with an exclusion filter that matches only `dev-latest`. Publish each hotfix under a new version tag.

ECR rejects attempts to overwrite existing tags unless they match the exclusion filter. The development tag can move, while each published production version continues to identify the same image.

Practice Artifact Immutability in a full exam

Questions on Artifact Immutability in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn Artifact Immutability in lessons

2 short lessons on Artifact Immutability in 1 certification course.

Open the lessons