IaaS for legacy migration with minimal code changes

CV0-004 By islever Editorial Last updated

Given a scenario, use the appropriate cloud service model. Summarize aspects of cloud migration.

Short answer

C Infrastructure as a Service keeps the legacy application's existing OS, middleware, and runtime on cloud VMs, enabling lift-and-shift migration with minimal code changes while retaining elasticity and pay-as-you-go benefits.

Question

An organization is migrating legacy applications to the cloud and wants to minimize changes to existing code while gaining cloud benefits. Which cloud service model would be MOST appropriate?
  1. Software as a Service (SaaS)
  2. Platform as a Service (PaaS)
  3. Infrastructure as a Service (IaaS) Correct Answer
  4. Function as a Service (FaaS)

Key Takeaways

Infrastructure as a Service is the cloud service model that best supports lift-and-shift migration of legacy applications because virtual machines preserve the existing OS, middleware, and runtime. With IaaS, an organization can move code to cloud VMs with minimal changes while gaining elasticity and pay-as-you-go infrastructure, whereas PaaS and FaaS impose runtime constraints and SaaS removes control of the application.

Expert Analysis

Because the legacy applications must keep their existing runtime and code while still gaining elasticity and pay-as-you-go infrastructure, the migration should land on virtual machines under Infrastructure as a Service rather than a higher-level platform.

Software as a Service removes the application layer the legacy code needs

In this migration, SaaS would be the costliest mismatch because it delivers a finished vendor application, not a host for the organization's custom legacy code; adopting it means retiring or rewriting the workload and accepting the vendor's data model, integration surface and release cadence. PaaS breaks the code less dramatically but still imposes a contract: the application must fit supported language runtimes, middleware, buildpacks and filesystem or networking rules, so incompatible libraries, agents or startup scripts trigger remediation. IaaS is not free of operational work—the customer still owns guest OS patching, middleware, runtime configuration and application security—but it preserves the machine-level contract the legacy code already depends on. FaaS is the most disruptive of the four for a legacy monolith because it requires decomposing the application into stateless, event-triggered functions with bounded execution time and different invocation, state and dependency-management patterns. Each non-IaaS option therefore buys a higher-level abstraction by charging the migration in code changes, control or architectural redesign, which is precisely the currency the organization says it cannot spend freely. A lift-and-shift into virtual machines can keep existing binaries, installers and monitoring agents intact, whereas the other three models force at least one boundary to move.

Infrastructure as a Service preserves the machine-level deployment contract

The decisive constraint is the code-change budget: the applications are legacy, and the migration is explicitly meant to minimize changes, so the target must present a virtual machine on which the existing OS image, middleware stack, agents, startup scripts and binaries can run in essentially their current form. IaaS supplies that contract by exposing compute, storage and networking as provider-managed infrastructure while leaving the guest operating system and application layers under customer control. That split is the practical reason IaaS supports rehosting, often called lift-and-shift, without pretending the application has become cloud-native: the provider handles the physical hosts, virtualization layer, network fabric and storage durability, and the customer configures the VM, patches the guest OS and manages the application. The cloud benefits still arrive—virtual machines can be resized, cloned into autoscaling groups, backed up as images or snapshots and billed on a pay-as-you-go basis—but they arrive around the workload rather than requiring a rewrite of it. A higher-level service would remove more operational work, yet it would also decide the runtime, scaling unit and integration model for code that was written before those choices existed.

Platform as a Service becomes the better answer only after portability is established

PaaS would displace IaaS if the legacy code were already compatible with the platform's supported language runtime, middleware and service bindings, and if the organization valued offloading guest OS and runtime patching more than avoiding code edits. In that case the application could be deployed as a platform component, with the provider managing the runtime, scaling and much of the operational stack. That condition is not established here: legacy applications commonly carry undocumented dependencies, specific file-system layouts, custom agents or older runtime versions that a PaaS buildpack will not reproduce, and the stated goal is to minimize code changes rather than modernize the architecture. FaaS would become correct under a different condition—if the workload were decomposable into short-lived, event-driven, stateless functions—but a legacy application is more likely to be a long-running monolith with session state and fixed execution assumptions. SaaS would become correct if the organization could replace its custom application with a standard packaged product and accept the vendor's process; the requirement to migrate existing code rules that out. Each alternative needs a portability or replacement precondition that the migration constraint denies.

Rehosting rule: map the change budget to the service boundary

Carry this if-then test to similar scenarios: when the requirement says existing applications must move with minimal or no code changes, start with IaaS and a rehosting pattern; when it says reduce operational overhead and the application is already portable to a supported runtime, consider PaaS; when it describes short, event-driven tasks that can be split into independent units, consider FaaS; and when it describes adopting a complete business function rather than hosting custom code, consider SaaS. The tiebreaker is not which model is more modern but which layer the customer is willing to keep managing. Under IaaS the customer retains the guest OS, middleware, runtime and application; under PaaS the provider takes the OS and runtime while the customer owns the application and its configuration; under FaaS the provider takes server and scaling management and the customer owns function code and event integration; under SaaS the provider owns the application itself. Apply that responsibility boundary to the migration's explicit constraint and the answer follows. Here, minimal code change maps to retaining the guest OS and runtime, so the virtual-machine boundary of IaaS is the only one that does not force a rewrite or replacement.

Official Reference

Exam Strategy

When an item pairs a cloud service model with a migration constraint, translate the constraint into a code-change budget before ranking the models: "minimal changes" and "lift-and-shift" point to IaaS virtual machines, while "managed runtime" or "reduce OS patching" points toward PaaS and "event-driven, short-lived" points toward FaaS. Reject SaaS whenever the workload is a custom application that must remain under organizational control. Check whether the stem asks for the service model rather than the deployment model, and anchor the choice on the layer the customer must still manage.

Practice All CV0-004 Questions

Access 100 questions with complete answers and detailed explanations.

View Full CV0-004 Practice Test →

← Back to CV0-004 Study Guide