Moving to the cloud is the easy part. Running it safely, cheaply and reliably every day is the real work. This guide starts with the concepts, then gives you ready-to-adapt Standard Operating Procedures (SOPs) for the processes you repeat and Methods of Procedure (MOPs) for the tasks you must get exactly right: pipelines, deployments, infrastructure as code, Kubernetes, secrets, database changes, restores and incident triage.
1. The concepts you need first
Cloud and DevOps are about two things: getting infrastructure when you need it, and shipping changes safely and often. The vocabulary below is used in every procedure that follows.
| Concept | What it means | Why it matters |
|---|---|---|
| IaaS / PaaS / SaaS | You rent raw infrastructure (virtual machines, networks), a managed platform (databases, app hosting) or a finished application. | The higher up you go, the less you operate yourself, but the less you can customise. |
| Shared responsibility | The provider secures the cloud itself (data centres, hardware); you secure what you put in it (identities, configuration, data). | Most cloud breaches come from customer configuration, not provider failure. |
| Region and availability zone | A region is a geographic area; a zone is an isolated data centre group inside it. | Spread across zones for resilience; choose regions for latency and data-residency rules (for example data kept in India). |
| Infrastructure as Code (IaC) | Infrastructure described in files (Terraform, CloudFormation, Bicep, Pulumi) and created by tools, not by hand. | Repeatable, reviewable, version-controlled environments. |
| CI/CD | Continuous Integration builds and tests every change; Continuous Delivery or Deployment releases it through automated stages. | Small, frequent, low-risk releases. |
| Containers and orchestration | A container packages an app with its dependencies; Kubernetes (or a managed service) schedules and heals containers. | Consistent runtime from laptop to production; horizontal scaling. |
| Observability | Metrics, logs and traces that let you ask new questions about a running system. | You cannot fix or improve what you cannot see. |
| SLI, SLO, error budget | Service Level Indicator (a measurement), Objective (a target, such as 99.9% of requests succeed) and the allowed failure left over. | Turns "keep it reliable" into a number teams can trade against feature speed. |
| FinOps | The practice of managing cloud spend with engineering, finance and business together. | Cloud cost is variable; without ownership it only grows. |
| DORA metrics | Deployment frequency, lead time for changes, change failure rate and time to restore service. | The four best-known indicators of delivery health. |
2. Foundations to put in place before anything else
- Account structure (landing zone): separate accounts or subscriptions for production, non-production, shared services and security/logging. Apply organisation-wide guardrails (deny dangerous actions, restrict regions).
- Identity: single sign-on, multi-factor authentication for everyone, role-based access, no shared accounts, no long-lived access keys where short-lived roles work. Give the least privilege that does the job.
- Network: private networks (VPC/VNet) with public, private and data subnets; databases never directly reachable from the internet; controlled egress; a way to reach private resources without opening them to the world (bastion, VPN or a managed session tool).
- Environments: at least dev, test/staging and production, built from the same code so that differences are deliberate.
- Tagging and ownership: every resource carries an owner, environment, application and cost-centre tag. Untagged resources are reported weekly.
- Secrets: kept in a secrets manager or vault, never in source code, images or chat.
- Budgets and alerts: a budget per account and application with alerts at, for example, 50%, 80% and 100%.
- Central logging and audit trail: cloud audit logs switched on in every account, sent to a protected, separate location.
3. Standard Operating Procedures (SOPs) for the most common processes
Each SOP is deliberately short. Copy it into your wiki, name a real owner, and adjust the numbers (for example response times) to your organisation.
Change management and release
- Purpose
- Make every production change visible, reviewed and reversible.
- Owner
- Engineering lead (service owner)
- Trigger
- Any change to production code, configuration or infrastructure
- Raise a change record: what, why, risk (low/medium/high), planned time, and the rollback plan.
- Open a pull request. Another engineer reviews it; automated tests, linting and security scans must pass.
- For medium or high risk, get approval from the service owner (and the change board if you have one). Low-risk, well-tested changes can use pre-approved "standard changes".
- Avoid changes during peak business hours and the night before holidays or major events ("change freeze" windows).
- Deploy through the pipeline only. Nobody changes production by hand; emergency exceptions are logged and reviewed afterwards.
- Watch dashboards and error rates for at least 30 minutes after the release.
- Close the change record with the outcome. If it failed or was rolled back, add a short note on why.
Evidence to keep: The change record, pull request, pipeline run and the post-release check.
Access management: joiners, movers, leavers and privileged access
- Purpose
- Give people only the access they need, for only as long as they need it.
- Owner
- IT/security lead with each team manager
- Trigger
- Hiring, role change, exit, or a request for elevated access
- Joiner: the manager requests access by role. Access is granted through groups, not individually, and MFA is enforced from day one.
- Mover: when someone changes role, remove the old role's groups before adding the new ones.
- Leaver: on the last working day disable single sign-on, revoke sessions and tokens, remove cloud and code-repository access, and rotate any shared secret they knew. Do this the same day.
- Privileged access: administrator rights are time-limited, approved and logged (just-in-time access where available). Break-glass accounts are stored securely and alert when used.
- Every quarter, owners review who has access to what and remove anything unused for 90 days.
Evidence to keep: Access request tickets, group membership exports and the quarterly review sign-off.
Incident management
- Purpose
- Restore service quickly, communicate clearly and learn from every incident.
- Owner
- On-call engineer (first response) and an Incident Commander for serious incidents
- Trigger
- An alert fires, a customer reports a problem, or monitoring shows an SLO breach
- Detect and acknowledge: the on-call engineer acknowledges the alert within the agreed time (for example 5 minutes).
- Classify severity: Sev1 = full outage or data risk; Sev2 = major feature degraded; Sev3 = minor impact. Sev1 and Sev2 start an incident channel and name an Incident Commander.
- Roles: Incident Commander (coordinates, decides), Operations lead (investigates and fixes), Communications lead (updates stakeholders and customers every 30 minutes for Sev1).
- Stabilise first: prefer the fastest safe action such as rollback, failover, scaling up or disabling a feature flag. Find the root cause later.
- Record a timeline as you go: time, observation, action.
- Resolve when metrics are back to normal and stable. Announce the all-clear.
- Post-incident review within 5 working days: blameless, focused on how the system and process allowed it. Produce actions with owners and dates.
Evidence to keep: The incident timeline, communications sent and the review document with tracked actions.
Backup and restore verification
- Purpose
- Be sure you can actually recover your data and systems.
- Owner
- Platform or database owner
- Trigger
- Daily backups run automatically; restore tests run every quarter
- Define for each system the RPO (how much data you can lose) and RTO (how long you can be down).
- Automate backups to match the RPO. Store copies in another account and region, with immutability or retention locks so an attacker cannot delete them.
- Monitor backup jobs; a missed or failed backup raises an alert the same day.
- Each quarter, restore a backup into an isolated environment, check the data and time the restore against the RTO.
- Record the result and fix any gap (missing step, expired key, too slow).
Evidence to keep: Restore test reports with measured recovery time.
Patching and image management
- Purpose
- Keep operating systems, containers and dependencies free of known vulnerabilities.
- Owner
- Platform team
- Trigger
- Monthly patch cycle and out-of-band for critical vulnerabilities
- Build golden images (virtual machine and container base images) from code and scan them.
- Rebuild images regularly rather than patching running servers; roll out new images through the normal pipeline.
- Set patch targets such as: critical within 7 days, high within 30 days, medium within 90 days.
- Test in a non-production environment, then roll out in waves with monitoring.
- Track exceptions with a risk acceptance, owner and expiry date.
Evidence to keep: Scan reports before and after, and the exception register.
Cloud cost governance (FinOps)
- Purpose
- Make cloud cost visible, owned and steadily lower per unit of value.
- Owner
- FinOps lead with service owners
- Trigger
- Weekly review and monthly business review
- Enforce tagging. Report spend by application, team and environment.
- Weekly: review the top 10 cost movers and any anomaly alerts; owners explain each.
- Right-size: remove idle resources, shut down non-production out of hours, resize over-provisioned instances and databases.
- Commit for steady workloads (reserved capacity or savings plans) once usage is stable; use spot or preemptible capacity for fault-tolerant jobs.
- Track a unit cost (for example cost per order or per 1,000 requests), not just the total bill.
Evidence to keep: The weekly cost review notes and the unit-cost trend.
On-call and alert hygiene
- Purpose
- Keep on-call sustainable and alerts meaningful.
- Owner
- Engineering manager
- Trigger
- Weekly on-call handover
- Every alert must need a human action and link to a runbook. Delete or tune alerts that fire without action.
- Page only on symptoms users feel (errors, latency, saturation); send causes to tickets or dashboards.
- Rotate on-call fairly, with a handover note covering open issues and recent changes.
- Review the noisiest alerts weekly and the on-call load monthly.
Evidence to keep: Handover notes and the alert review log.
4. Methods of Procedure (MOPs) for common tasks
A good MOP can be followed by a competent engineer who has not done the task before. Always run it first in a non-production environment.
Set up a CI/CD pipeline for a service
- Use when
- Starting a new service, or replacing manual deployments.
- Source code in version control with a protected main branch.
- A target environment and a deployment identity with least privilege.
- Agreed tests: unit, integration and a smoke test.
- Trigger the pipeline on every pull request and on merge to main.
- Build once and produce a versioned, immutable artifact (for example a container image tagged with the commit hash).
- Test: unit tests, then integration tests; fail fast.
- Scan: static code analysis, dependency vulnerabilities, secret detection and an image scan. Block on critical findings.
- Publish the artifact to a registry. Never rebuild for a later stage; promote the same artifact.
- Deploy to staging automatically, run smoke tests.
- Approve (manual gate or automatic when checks pass) and deploy to production using a safe strategy (see MOP-2).
- Notify the team and record the deployment against the change record.
- A change goes from pull request to staging with no manual step.
- The same image digest runs in staging and production.
- A failed test or scan stops the pipeline.
- Revert the commit or redeploy the previous artifact version (see MOP-2).
A minimal pipeline definition looks like this (GitHub Actions style; other tools are similar):
name: ci
on: [pull_request, push]
jobs:
build-test-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: make test
- name: Dependency and secret scan
run: make scan
- name: Build image
run: docker build -t registry.example.com/app:${{ github.sha }} .
- name: Push image
run: docker push registry.example.com/app:${{ github.sha }}
Deploy with blue/green or canary, with rollback
- Use when
- Releasing a change with minimal user impact.
- Version N+1 artifact is built, tested and scanned.
- Database changes are backward compatible (see MOP-6).
- Health checks and dashboards exist for the service.
- Announce the start in the change channel.
- Deploy N+1 alongside N (green next to blue), or to a small share of traffic (canary, for example 5%).
- Run smoke tests against N+1.
- Shift traffic gradually (5%, 25%, 50%, 100%) while watching error rate, latency and business metrics at each step.
- Keep N running and idle for the agreed soak period (for example 1 hour), then retire it.
- Error rate and latency are within the SLO for the full soak period.
- Key business flows (login, checkout, API calls) pass.
- Shift traffic back to N immediately. On Kubernetes:
kubectl rollout undo deployment/appand confirm withkubectl rollout status deployment/app. - Record the reason and file a fix.
Provision infrastructure with Terraform (or similar IaC)
- Use when
- Creating or changing cloud resources.
- Code in version control; remote state with locking and encryption.
- Credentials are short-lived and scoped to the target account.
- Create a branch and edit the configuration.
- Format and validate:
terraform fmt -checkthenterraform validate. - Run
terraform plan -out=tfplanand attach the plan to the pull request. - A second person reads the plan, especially anything marked "destroy" or "replace".
- After approval, run
terraform apply tfplanfrom the pipeline, not a laptop. - Tag all resources with owner, application and environment.
- The plan after apply shows no further changes.
- Resources work as expected and appear in monitoring.
- Revert the code change and apply again. For destroyed data resources, restore from backup (MOP-7). Never edit the state file by hand without a backup.
Containerise an application and run it on Kubernetes
- Use when
- Moving a service to containers and a managed Kubernetes platform.
- A working build and a health endpoint (for example /healthz).
- A namespace and quotas for the team.
- Write a small, multi-stage
Dockerfile: build in one stage, copy only the result into a minimal base image, run as a non-root user. - Pin base image versions and scan the image.
- Create a Deployment with 2 or more replicas, resource requests and limits, a readiness probe and a liveness probe.
- Put configuration in ConfigMaps and secrets in a secrets manager (not in the image).
- Expose it with a Service and Ingress; add a HorizontalPodAutoscaler.
- Add a PodDisruptionBudget and spread replicas across zones.
- Apply with
kubectl apply -f(or a GitOps tool) and watchkubectl rollout status.
kubectl get podsshows all pods ready; the readiness probe passes.- The service survives killing one pod.
kubectl rollout undo deployment/appreturns to the previous version.
apiVersion: apps/v1
kind: Deployment
metadata: { name: app }
spec:
replicas: 2
selector: { matchLabels: { app: app } }
template:
metadata: { labels: { app: app } }
spec:
containers:
- name: app
image: registry.example.com/app:1.4.2
ports: [{ containerPort: 8080 }]
resources:
requests: { cpu: "250m", memory: "256Mi" }
limits: { memory: "512Mi" }
readinessProbe: { httpGet: { path: /healthz, port: 8080 }, periodSeconds: 5 }
livenessProbe: { httpGet: { path: /healthz, port: 8080 }, initialDelaySeconds: 15 }
Rotate a secret or access key safely
- Use when
- Scheduled rotation, a suspected leak, or someone with access leaving.
- Inventory of where the secret is used.
- A way to deploy the new value without downtime (two keys valid at once).
- Create the new secret or key (do not delete the old one yet).
- Store it in the secrets manager.
- Roll it out to every consumer through the normal deployment.
- Confirm every consumer uses the new value (check access logs for the old key).
- Disable the old key, wait through a short observation period, then delete it.
- If a leak is suspected, also review audit logs for use of the old key and treat it as a security incident.
- No errors from consumers; no recent use of the old key.
- Re-enable the old key briefly if a consumer was missed, then fix and retry.
Change a database schema without downtime (expand and contract)
- Use when
- Adding or changing columns, tables or indexes in a live system.
- A recent, tested backup (MOP-7).
- Application code that can work with both the old and new schema.
- Expand: add the new column or table in a way that does not break the running version (nullable column, new table, concurrently built index).
- Deploy application code that writes to both old and new structures and reads from the old.
- Backfill existing data in small batches, watching database load.
- Switch reads to the new structure; verify results.
- Contract: after a safe period, stop writing to the old structure and remove it in a later release.
- Row counts and checksums match between old and new.
- No increase in errors or slow queries.
- Switch reads back to the old structure; because the old one was kept until the end, no data is lost.
Restore from backup (drill or real recovery)
- Use when
- Quarterly test, or after data loss or corruption.
- Access to the backup account and decryption keys.
- An isolated environment to restore into.
- Identify the recovery point (the time you want to recover to).
- Restore into a new instance or environment, not over the live one.
- Run integrity checks and compare sample records with production.
- Measure total elapsed time and compare with the RTO.
- For a real recovery, switch the application to the restored system in a planned cut-over, and keep the damaged system for investigation.
- Data is complete up to the recovery point; the application works against it.
- Time taken is within the RTO or the gap is recorded.
- If the restore is wrong, repeat with an earlier recovery point.
First-response triage when a service is slow or down
- Use when
- A latency or availability alert fires.
- Access to dashboards, logs and the deployment history.
- Check scope: who and what is affected, and since when?
- Check recent changes first (deployments, configuration, feature flags, certificate or DNS changes). Most incidents follow a change.
- Look at the four golden signals: latency, traffic, errors, saturation (CPU, memory, disk, connections).
- Check dependencies (database, cache, queue, third-party APIs).
- On Kubernetes:
kubectl get pods,kubectl describe pod <name>,kubectl logs <name> --previous,kubectl top pods. On a server:top,df -h,free -m,ss -s. - Mitigate: roll back, scale out, restart a stuck component, or turn off a non-essential feature.
- Declare an incident (SOP-3) if users are affected.
- The error rate and latency return to normal and stay there.
- If your mitigation made things worse, undo it and try the next safest option.
5. Observability, SLOs and alerts that help
- Collect three signals: metrics (numbers over time), logs (events) and traces (a request's path across services).
- Choose a few SLIs per service: availability (successful requests), latency (for example 95% of requests under 300 ms) and freshness or correctness where relevant.
- Set SLOs from user needs. 99.9% over 30 days allows about 43 minutes of failure. If the error budget is spent, slow feature releases and fix reliability.
- Alert on burn rate (how fast the budget is being used) rather than on every spike.
- Write runbooks that start from the alert: what it means, how to check, how to fix, who to call.
6. Build security into the pipeline
- Scan source for secrets and known-vulnerable dependencies on every change; generate a software bill of materials (SBOM) for releases.
- Sign artifacts and deploy only signed, scanned images from your own registry.
- Use infrastructure policy checks (for example block public storage buckets and open administrative ports) before apply.
- Run cloud posture checks continuously and send findings to a ticketing system with owners.
- See our Cybersecurity guide for the wider programme and incident response.
7. Common mistakes to avoid
- Doing one-off manual changes in production and never putting them in code ("snowflake" servers).
- No tested restore: backups that have never been restored are only hope.
- Giving everyone administrator rights because it is quicker.
- Alerts that nobody acts on, until real alerts are ignored too.
- Deploying large changes rarely, instead of small changes often.
- Lifting and shifting everything without checking cost and ownership, then being surprised by the bill.
- One big shared environment instead of separate accounts for production and non-production.
- No owner or tag on resources, so nobody dares to delete anything.
- Treating DevOps as a team name instead of a way of working across development, operations and security.
8. Measure what matters
| Metric | Healthy direction | Notes |
|---|---|---|
| Deployment frequency | Higher | Small changes, shipped often |
| Lead time for changes | Lower | From commit to running in production |
| Change failure rate | Lower | Share of releases causing an incident or rollback |
| Time to restore service | Lower | Measured per incident |
| SLO attainment and error budget | On target | Per service |
| Cost per unit (order, user, 1,000 requests) | Flat or falling | Better than total spend alone |
| Restore test success and time | Passing, inside RTO | Quarterly |
9. A 30-60-90 day starting plan
- Days 1โ30: multi-factor authentication everywhere, separate production from non-production accounts, tagging and budgets, central audit logs, an inventory of systems and owners, and a first tested backup restore.
- Days 31โ60: a CI/CD pipeline with tests and scans for your most important service, Infrastructure as Code for new resources, basic dashboards and SLOs, an incident process (SOP-3) and on-call rota.
- Days 61โ90: blue/green or canary releases with rollback, a patching cycle, cost reviews, a first game-day exercise (practise an incident), and a backlog for the next quarter.
10. Quick checklists
Before a production release
- Change record and rollback plan are ready.
- Tests and scans passed in the pipeline.
- Database changes are backward compatible and backed up.
- Dashboards and alerts are open; the team knows who is on call.
- Not a freeze window; communication is planned.
Every week
- Review incidents, alerts and the top cost changes.
- Check backup and patch status.
- Review access requests and any break-glass use.
Need a hand? Our team helps with cloud architecture, migrations, platform engineering and operating models. See Cloud Architecture and the Cloud Migration guide, or get in touch.