An inherited application rarely needs a new architecture before it needs a safer way to deploy. For a CTO choosing between an in-house platform and a managed service, I would buy the deployment substrate first and keep application release decisions in-house. That position is reversible: move one service behind a controlled deployment path, preserve its existing runtime behavior, and let the results determine whether a custom platform is worth funding.
The first boundary should be a deployment boundary, not a code boundary
Start with a service that already has a known owner, a repeatable build, and a route you can test. Do not start with the repository’s most tangled service: a failed pilot there would tell you little about the platform because application defects and deployment defects would be difficult to separate. The first change should leave request handling, database access, and business logic alone. It should replace only the path from a built artifact to a running instance.
Draw that path as it exists today. Record who builds the artifact, where secrets enter, which command starts the process, how traffic reaches it, and who can reverse a release. An application on a virtual machine may have those steps split across a Jenkins job, a shell script, an AWS IAM user, and an operator’s memory. The map matters because a managed deployment service will not remove an undocumented step; it will merely expose the missing step when the first release stalls.
Make a container image only if the target platform requires one, and keep the initial Dockerfile deliberately literal. Pin the base image by digest, copy the existing build output, retain the current startup command, and send logs to standard output. Changing the framework, splitting the repository, and moving from PostgreSQL to another database during this pilot would confound the result because each adds a separate failure mode. If a service cannot be packaged without rewriting its startup sequence, choose a different pilot and document that constraint.
Give the service a readiness route that checks whether it can accept traffic, not whether every dependency in the estate is healthy. A route that blocks on an optional analytics API can take healthy instances out of rotation because a peripheral outage then becomes a deployment outage. Keep liveness separate if the runtime supports it: liveness should identify a stuck process, while readiness should govern traffic. For an existing application with no such route, add the smallest endpoint possible and review it as an application change before moving the deployment.
Before switching traffic, capture the present release procedure in a short runbook and exercise its rollback once. This is not ceremony: the old path remains the recovery path until the new one has completed a production rollback. A sensible pilot allowance is two releases through the new path before retiring the old job; that is a planning value to adjust to the service’s release frequency, not evidence that two releases prove reliability.
A thin compatibility layer beats a new platform API
Put infrastructure definitions beside the application only where a code change and an infrastructure change must land together. For example, a new environment variable and the code that reads it belong in the same reviewed change. Shared network policy and account-level IAM belong in a separately owned repository because an application pull request should not be able to change permissions for unrelated services. This division gives developers a useful local view without making every repository an account administrator.
Use Terraform 1.9 or a deliberately selected OpenTofu version for the small amount of infrastructure the pilot needs, and pin the provider versions in the lock file. Do not import an entire existing cloud account into a new state file: that would enlarge the review and rollback surface before the pilot has demonstrated value. Define the new service, its IAM role, its traffic target, and its log destination; reference existing shared resources through reviewed outputs or data sources. Keep state remote with locking and restrict write access, because two concurrent applies against one state can make a routine release unpredictable.
The compatibility layer should translate the application’s current contract into the managed runtime’s contract. If it reads configuration from environment variables, preserve their names. If it expects a PostgreSQL schema migration, continue running Flyway as an explicit release step rather than hiding it in every application startup. A migration that runs on each replica can race during scale-out, so make schema changes backward-compatible with both the old and new application versions before shifting traffic. A new nullable column, followed by code that uses it, is easier to reverse than renaming a column while both versions are live.
Keep the release interface small enough to explain in a pull request: build an immutable image, run existing tests, publish the image, deploy that exact digest, run a smoke check, and retain the previous digest. GitHub Actions can use OpenID Connect with permissions: id-token: write to request short-lived AWS credentials; an AWS IAM trust policy should constrain both repository and branch claims because an unconstrained token exchange could grant the same deployment role to an unintended workflow. Avoid a permanent cloud access key in repository secrets when federation is available, because rotation and attribution are harder with a shared long-lived credential.
I would not introduce a bespoke internal developer portal for this pilot. It would force the team to design an abstraction before it knows which deployment steps recur, and its interface could become a second migration project. A reviewed workflow file, an infrastructure module with a narrow input set, and a one-page rollback runbook are enough to test whether the boundary works.
Buy the runtime unless a specific constraint pays for Kubernetes
AWS ECS on Fargate and self-operated Kubernetes are two concrete choices for an application already hosted on AWS. Fargate wins when the service needs a container, ordinary traffic routing, and controlled releases but the team does not need to operate cluster nodes; its cost includes AWS usage charges, service-specific configuration, and less control over the runtime. Self-operated Kubernetes wins when existing workloads require Kubernetes APIs or scheduling behavior that the team already operates well; its cost includes cluster upgrades, add-ons, security patching, and an on-call surface that persists even when applications are quiet. Neither choice eliminates application ownership, because both will faithfully deploy a broken image.
I would answer Should a CTO Build or Buy Cloud Infrastructure? with a narrower decision: buy the first production runtime, then build only the release controls the application actually needs. That order makes the decision testable because the team can observe which constraints a managed runtime fails to meet before funding a platform intended to solve them. If the application relies on privileged containers, custom network behavior, or an existing Kubernetes operator, document that requirement and price the in-house route against it rather than treating Kubernetes adoption as an architectural milestone.
Keep the buying decision separable from the codebase. Store the image in a registry under your control, keep configuration names stable, and avoid calling a vendor deployment SDK from request-handling code. Use an adapter at the deployment boundary for task definitions, routing, and secrets. That does not make migration free: traffic rules, observability, and IAM would still move. It does mean the application is not rewritten merely because a procurement decision changes.
Set a decision date before the pilot starts. A provisional six-week window is long enough for a team with regular releases to encounter routine failures, but it is a schedule assumption to revise if the service deploys infrequently. At the end, compare the managed path with the current path and with a priced in-house proposal. Include engineer time spent maintaining CI, infrastructure code, and incident runbooks in both estimates, because excluding that labor would make the build option appear cheaper than it is.
Release evidence should decide whether the seam expands
Automation is useful only if it changes what happens during an actual release. Measure the current service before moving it: take release start and finish times from CI logs, identify production failures from incident records, and record the time from a rollback decision to restored traffic. Keep the definitions fixed during the pilot. A deployment that finishes in CI but has not received production traffic is not finished under a definition meant to capture release risk.
I use Is your DevOps automation working Check these 5 metrics as a prompt, but I would not turn its metrics into a universal scorecard; an inherited service needs measures tied to the deployment boundary being changed. Track lead time from a merged change to serving traffic, change failure rate for releases requiring intervention, and restore time after a bad deployment. Add one local signal, such as the number of manual production steps, because a faster pipeline can still leave an operator performing the risky part by hand.
Instrument the comparison at the boundary. GitHub Actions provides workflow timestamps; AWS CloudTrail can show who or what changed the production service; Prometheus or OpenTelemetry can supply error and latency signals after traffic shifts. Annotate dashboards with the deployed image digest so an operator can connect a regression to a release without guessing. For a first canary, 10% of traffic is a starting fraction to tune against request volume and risk, not a claim that every service has enough traffic for a meaningful sample. A low-volume service may need a longer observation period or a different validation method.
A smoke check should exercise an existing production-safe route and fail the release when that route cannot answer. This POSIX shell example runs with curl after TARGET_URL is set; replace /healthz with the service’s reviewed readiness path.
set -eu
: "${TARGET_URL:?set TARGET_URL to the deployment URL}"
for attempt in 1 2 3 4 5; do
code=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 3 "$TARGET_URL/healthz" || true)
if [ "$code" = "200" ]; then echo "ready"; exit 0; fi
sleep 2
done
echo "readiness check failed: ${code:-no response}" >&2
exit 1
The five attempts and three-second timeout are adjustable check settings; set them against observed startup time rather than copying them into every service. This check establishes reachability, not correctness, so pair it with an error-rate guard and a rollback command that an operator has executed in a rehearsal. Expand to a second service only after a real release and a deliberate rollback both work. Otherwise, expansion multiplies an unproven procedure across the codebase.
The next decision should start with one release record
Ask the service owner for the last production release record tomorrow: commit, artifact, deployment command, traffic switch, and rollback action. Mark every step that depends on a person or an untracked credential. Then select the least disruptive service whose record can be reproduced, and schedule its rollback rehearsal before approving a new platform purchase. That record will give the build-versus-buy discussion a concrete boundary to price.



