Cloud concept · Updated

Version Control - Version control is the practice of tracking and identifying changes to artifacts so teams can compare revisions, reproduce releases, and restore earlier states.

In short

Version control creates a traceable history for artifacts such as source code, infrastructure definitions, configuration, and AI prompts. It helps engineers collaborate safely, connect deployed behavior to specific revisions, and recover from changes that introduce errors or regressions.

Cloud Concepts Hub →

6 key aspects of Version Control

Effective version control combines traceable revisions, stable releases, evaluation, dependency tracking, and governed rollback.

01
Identifiable revision history

Assign each preserved revision a stable identifier and record its purpose. This lets engineers connect observed behavior to the exact artifact used by a deployment.

02
Separation of drafts and releases

Allow experimentation without changing the artifact used in production. In Bedrock Prompt Management, edit the working draft and create a numbered version to preserve a release candidate.

03
Evaluation before promotion

Compare prompt revisions using representative inputs and explicit quality, safety, latency, and cost criteria. Preserve evaluation results alongside the version identifier so approval decisions remain traceable.

04
Controlled deployment and rollback

Pin applications to approved versions and retain the configuration needed to select an earlier release. Rollback changes which artifact is used; it does not reverse external side effects.

05
Dependency traceability

Track the model, inference settings, retrieval configuration, and application release associated with a prompt. Prompt history alone is insufficient to explain every change in generated output.

06
Governed retention and access

Restrict editing and release permissions, and define how long obsolete revisions are retained. Avoid embedding secrets or sensitive customer examples because historical versions may remain accessible.

Cloud services for Version Control

Amazon Bedrock Prompt Management preserves approved prompt definitions, while S3 Versioning can retain supporting datasets, exports, and evaluation artifacts. CodePipeline can coordinate tests, approval gates, and deployment configuration changes that select a specific prompt version. Lambda provides independently versioned application code that invokes the prompt. Together, these services support a traceable release process when engineers explicitly record the relationships among their identifiers. Their version histories remain separate: publishing a Lambda version does not snapshot a Bedrock prompt or an S3 object. A release record should identify each dependency and the earlier combination to restore if validation or production monitoring detects a regression.

Amazon Bedrock

Amazon Bedrock Prompt Management supports reusable prompt templates, variables, prompt variants, and immutable numbered versions created from a working draft. Applications can reference an approved prompt version to separate production behavior from ongoing prompt edits.

Amazon S3Amazon S3

S3 Versioning retains multiple versions of objects, which can help preserve prompt exports, evaluation datasets, and release artifacts. Object versioning does not provide Git-style branching, merging, or code review.

AWS CodePipelineAWS CodePipeline

CodePipeline can orchestrate validation, approval, and deployment stages for versioned application and prompt artifacts. It coordinates the release workflow rather than serving as the version-control repository itself.

AWS LambdaAWS Lambda

Lambda supports immutable published function versions and aliases that reference versions. A release process can associate a function version with a specific approved prompt version, although Lambda versioning does not automatically version external prompt resources.

Version Control exam questions

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

AIF-C01

A company uses Amazon Bedrock Prompt Management for an assistant that answers questions about public product manuals. A saved prompt template contains variables for the customer's question and reference text retrieved from the manuals. The manuals change over time. Reviewers must be able to reconstruct the saved prompt configuration and the exact question and reference text supplied for any past request. The company does not need to reproduce the model's exact output. Which approach best meets these requirements?

Show answerCORRECT ANSWER

Use a numbered prompt version and record its version ARN together with the question and retrieved reference text supplied for each request.

A numbered version preserves the saved prompt configuration, but it does not preserve values supplied at invocation time. Recording the version ARN and the actual variable values allows reviewers to reconstruct both parts of a historical request.

MLA-C02 (beta)

A company fine-tunes a foundation model in Amazon Bedrock in a development AWS Region. An AWS CodePipeline release pipeline evaluates each custom model and records its ARN in an immutable release manifest. Production must run in a different Region in the same AWS account and must use the exact evaluated model without retraining. The selected model supports cross-Region custom model copying, and inference requires Provisioned Throughput in both Regions. The production application uses a regional Bedrock Runtime client.

Which deployment procedure should the ML engineer automate?

Show answerCORRECT ANSWER

Call CreateModelCopyJob in the production Region with the release manifest's custom model ARN and source Region. Wait for the copy to complete, create Provisioned Throughput for the resulting target model ARN, and wait until it is InService. Record the destination identifiers in the release record and configure production to invoke the destination provisioned model ARN.

Cross-Region custom model copying transfers the evaluated model without retraining. Using the manifest's exact source ARN preserves release identity. Waiting for copying and provisioning to finish ensures readiness, and invoking the destination provisioned model ARN serves the copied model in the required Region.

AIP-C01

A company stores approved prompt packages at immutable keys in an Amazon S3 general purpose bucket. Production applications read a shared release-manifest.json object that maps each prompt name to its approved package key. Independent approval pipelines can promote different prompts concurrently by updating entries in this manifest.

Each pipeline currently reads the manifest, changes its entry, and uploads the complete manifest. During concurrent promotions, one pipeline sometimes removes another pipeline's newly approved mapping by uploading an older copy. Every published manifest must preserve unrelated approved mappings, and the manifest must remain continuously readable. The company wants to coordinate updates through S3 without introducing a separate locking service.

Which implementation BEST meets these requirements?

Show answerCORRECT ANSWER

Read the manifest and its ETag, merge the approved mapping, and call PutObject with If-Match set to that ETag. If a concurrent update causes a precondition failure, reread the manifest, merge the change into the current content, and retry conditionally.

An If-Match conditional write implements optimistic concurrency control. S3 accepts the replacement only when the current object's ETag matches the value the pipeline read. A losing pipeline must merge its change into the newly current manifest before retrying, preserving unrelated promotions without making the manifest unavailable.

Practice Version Control in a full exam

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

Start a free practice exam

What is Version Control

3 min read

Version control makes changes explicit and recoverable. Rather than repeatedly overwriting an artifact, a team preserves identifiable revisions and records why changes were made. An artifact might be application code, an infrastructure template, a configuration file, or a foundation model prompt. A useful revision history connects each change to its author, purpose, review, and validation results.

In cloud applications, version control separates ongoing development from released behavior. Engineers can edit a working copy while production continues to use an approved revision. Git-based systems support commits, branches, and merges, while individual cloud services may provide numbered snapshots or object versions. These mechanisms implement related ideas but do not necessarily offer the same collaboration features.

Prompt versioning applies this discipline to instructions that influence foundation model behavior. A small change to wording, examples, or an output schema can affect accuracy, safety, latency, and token consumption. Treat prompts as application artifacts rather than disposable strings. Record the prompt template, variable definitions, model selection, supported inference settings, and evaluation evidence associated with a release.

Amazon Bedrock Prompt Management provides a managed way to create reusable prompt templates with variables, configure supported model settings, and test prompt variants. Engineers modify a working draft and create a numbered version when they want to preserve a snapshot. A created version cannot be edited; subsequent changes belong in the draft and require another version. A prompt variant is an alternative configuration within a prompt, not a replacement for version history.

For example, a support assistant might use a prompt with a variable for the customer's question. An engineer revises the instructions to require a structured response and tests the change against representative questions. The team compares correctness, formatting compliance, harmful responses, latency, and cost before approving a new version. The application references the approved version through its version-specific prompt identifier rather than depending on an editable draft.

Deployment and rollback remain separate operational responsibilities. Preserve the mapping between an application release and its prompt version, model identifier, retrieval configuration, and other dependencies. If the new prompt causes regressions, update the application configuration to reference the previous approved version. Restoring a prompt does not undo external actions already taken by the application or restore a knowledge base that changed independently.

Versioning also does not guarantee identical model responses. Generation can remain nondeterministic, and changes to inputs, model availability, retrieved documents, or external tools can affect results. Reproducibility therefore requires recording the surrounding execution context, not just the prompt text. Likewise, version control is not a substitute for backups, access controls, approval workflows, or evaluation.

The main trade-offs are additional storage, review effort, and lifecycle management. Retaining every experiment indefinitely can create clutter and preserve sensitive material unnecessarily. Keep secrets and customer data out of reusable templates and repository history, restrict who can change or release prompts, and establish retention rules. For exam scenarios, distinguish managed prompt drafts, variants, and immutable versions from model training or fine-tuning: prompt versioning manages the instructions and configuration used with a model, not changes to its learned weights.

Learn Version Control in lessons

9 short lessons on Version Control in 6 certification courses.

and 3 more lessons

Open the lessons