DevOps Take Home Assignment: What Reviewers Grade and How to Pass

Branko Petric
Branko Petric

- 15 min read

The short answer

A DevOps take home assignment is graded on whether a stranger can run it, trust it and understand it. Make it work from the README in one or two commands, keep secrets out of the repo, use least privilege, validate everything, write down what you skipped and why, and be ready to defend each choice.

A DevOps take home assignment usually arrives as a short brief, a repo link or a zip, and a deadline. Most of the advice online about these tasks is written for the people who set them: how to design a fair assessment, how to score it, which platform to send it through. This post is for the other side. You have the brief, you have a few evenings, and you want to know what the reviewer will actually look at.

The short version: the reviewer is not grading whether you can make it work on your laptop. They are grading whether they would let you push to their main branch. Everything below follows from that.

For the rest of the interview loop (screens, live troubleshooting, design rounds), see how to pass a DevOps interview. This post covers the take home and the review call that follows it.

Common DevOps take home assignment types

There is no standard format, but a handful of shapes come up again and again. Expect one of these, or two glued together.

Containerize an app and deploy it with CI. You get a small web service (often Node, Python or Go) and are asked to write a Dockerfile, a CI pipeline that builds and tests it, and some way to deploy it. Sometimes "deploy" means a real cloud account, sometimes it means docker compose or a local Kubernetes cluster like kind or minikube.

Terraform a small AWS setup. A VPC with public and private subnets, an ALB in front of an autoscaling group or an ECS service, maybe an RDS instance. This is the classic terraform take home test. The reviewer wants to see module boundaries, variables with sensible defaults, outputs, and how you handle state.

A Kubernetes manifest or Helm task. Write manifests or a chart for a service: Deployment, Service, Ingress, ConfigMap, maybe an HPA. Graders look at resource requests, probes, security context and whether config is separated from the image.

A log-parsing or automation script. Parse an access log and report the top N clients or error rates, rotate something, call an API and handle failures. This is the devops coding challenge interview variant. Bash or Python is usually fine. Error handling and input validation matter more than cleverness.

Debug a broken repo. You get a repo that does not build, a pipeline that fails, or a cluster config with three planted bugs. You fix it and explain what was wrong. The written explanation is often worth as much as the fix.

An sre take home assignment tends to lean on the last two, plus monitoring: add metrics, write an alert, define an SLO for the service you just deployed.

What reviewers actually grade

No company publishes its real rubric, but the things reviewers check are consistent because they come from the same question: would I trust this person's pull requests? Here is the list, roughly in the order a reviewer hits them.

It runs from the README in one or two commands. The reviewer clones the repo, reads the README, and types what it says. If that fails, everything after it is read with less goodwill. make up or docker compose up --build plus one terraform apply is the target. Test this yourself from a fresh clone before you submit.

Sensible defaults. Variables have defaults that work for a demo: a small instance size, one region, one replica of anything expensive. The reviewer should not have to invent ten values to try it.

No secrets in the repo. No .env, no terraform.tfvars with real values, no access keys, no private keys, no .tfstate. Commit a .env.example and a terraform.tfvars.example instead. Assume the reviewer may run a secret scanner over the whole git history, not just the final tree.

Least privilege. IAM policies scoped to the resources they touch, security groups that only allow what is needed, containers that do not run as root, a CI token with contents: read unless a job needs more. One wildcard policy with a comment explaining it is fine. Wildcards everywhere with no comment is a fail signal.

State handled sensibly. For Terraform, that means at least a commented remote backend with locking and a note on how you would bootstrap it. Local state for a demo is fine if you say so. Committed state is not.

Idempotent. Running the script or the apply twice should not break anything or create duplicates. A second terraform plan should say no changes.

Small, readable commits. A history like "add Dockerfile", "add CI build and test", "add terraform network module" lets the reviewer follow your thinking. One commit called "done" hides it.

Validation, if not tests. Real tests are best. At minimum, run the cheap linters and show it in CI: terraform fmt -check, terraform validate, tflint, hadolint for Dockerfiles, shellcheck for scripts, helm lint or a schema check for manifests.

Health checks. A /healthz or similar endpoint, a container healthcheck, readiness and liveness probes in Kubernetes, a target group health check on the ALB. This shows you think about the thing running, not just the thing building.

Clear trade-offs. A short section in the README that says what you chose, what you rejected and why. This is often the single highest-signal part of the submission, because it is where the reviewer sees your judgment instead of your typing.

Notice what is not on this list: the number of tools you used, whether you picked the reviewer's favorite CI vendor, and polish on things the brief did not ask for.

How to scope the time

Briefs often say "should take about 3-4 hours" and give you a week. Treat the stated estimate as the budget the reviewer has in mind, not a minimum. A submission that clearly took 30 hours does not score better, and it can raise the question of whether you can scope work.

The first hour:

  1. Read the brief twice. Write down every explicit requirement as a checklist in the README draft.
  2. List what is ambiguous. Send the questions now, in one message, and make a stated assumption for each in case the answer is slow.
  3. Get the thinnest possible end-to-end path working: the app builds in a container, runs, and answers a health check. Ugly is fine.
  4. Commit that. You now have something that runs, which is the floor for passing.

The middle: add the pieces in order of what the reviewer grades. CI that builds and validates, then infrastructure, then the security and least-privilege pass, then health checks and teardown. Commit after each one.

What to cut: multi-environment setups, a custom monitoring stack, service mesh, GitOps controllers, autoscaling tuning, anything the brief did not mention. Cutting is fine. Cutting silently is not.

Write down what you skipped and why. A line like "No HTTPS on the ALB: needs a domain and an ACM certificate, which the brief did not provide. In production I would add an ACM cert and redirect 80 to 443" scores better than either skipping it silently or burning two hours on it. It shows you knew it mattered and made a conscious call.

Leave the last stretch of your time for a fresh-clone test, the README, and a teardown test. Most failed submissions fail on these, not on the hard part.

A README template that answers the review questions

The README is the first thing the reviewer reads and the thing they keep open during the review call. This template is a solid starting point. Delete sections that do not apply, but keep "Decisions and trade-offs" and "What I would do with more time" no matter what.

# <Project name>

## Overview
One paragraph: what this deploys, and which parts of the brief it covers.
Link to the brief requirements checklist below.

## Architecture
A short diagram (ASCII is fine) and 3-5 bullets:
- ALB in public subnets -> ECS service in private subnets
- Image built in CI, pushed to ECR, tagged with the git SHA
- State in S3 with lockfile locking (see "State" below)

## Prerequisites
- Docker 27+, Terraform 1.11+, AWS CLI v2
- An AWS profile with permissions to create the resources in infra/

## How to run
    cp infra/terraform.tfvars.example infra/terraform.tfvars
    make up        # builds the image, runs terraform init + apply
Expected output: the ALB URL. Check it with:
    curl -fsS "$(terraform -chdir=infra output -raw url)/healthz"

## How to tear down
    make down      # terraform destroy, then deletes the ECR images
Everything is in one state, so destroy removes all of it.

## Decisions and trade-offs
- ECS Fargate over EKS: one service, no need for a cluster to manage.
- Single NAT gateway: cheaper for a demo, a single point of failure.
  Production would use one per AZ.
- Local state by default, remote backend commented in versions.tf.

## What I would do with more time
- HTTPS with ACM and a real domain
- Separate state per environment
- Integration test in CI against a preview environment

## Security notes
- CI authenticates to AWS with OIDC, no long-lived keys
- Container runs as a non-root user
- App security group only accepts traffic from the ALB security group

## Cost notes
Rough idle cost per day, and which resource dominates it (usually NAT).
Run `make down` when done.

The cost notes section is cheap to write and rare in submissions. It tells the reviewer you know a NAT gateway or an idle load balancer bills by the hour, and that you will not leave their sandbox account running all weekend.

Worked example: a skeleton with good defaults

Here is a minimal skeleton for the most common shape: a containerized service, built in GitHub Actions, deployed to AWS with Terraform. It is not a full solution. It shows the defaults that reviewers look for, so you can check your own submission against it.

Dockerfile: pinned base, non-root, healthcheck

# Pin a specific version, never :latest
FROM node:22.11-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev

FROM node:22.11-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# The official node image ships an unprivileged "node" user
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
  CMD wget -qO- http://127.0.0.1:3000/healthz || exit 1
CMD ["node", "server.js"]

Pair it with a .dockerignore that excludes .git, node_modules, .env and any Terraform directories, or COPY . . will copy them into the image. Copying the lockfile before the source means a code change does not reinstall dependencies, which is the same fix the docker image bloat challenge is about. One thing worth knowing for the review call: Kubernetes ignores the Dockerfile HEALTHCHECK, so a Kubernetes submission needs readiness and liveness probes in the manifest as well.

GitHub Actions: least privilege and OIDC instead of keys

name: ci
on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

jobs:
  validate:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: hashicorp/setup-terraform@v3
        with:
          terraform_version: 1.11.4
      - run: terraform fmt -check -recursive
      - run: terraform -chdir=infra init -backend=false
      - run: terraform -chdir=infra validate
      - uses: hadolint/hadolint-action@v3.1.0
        with:
          dockerfile: Dockerfile

  build-push:
    needs: validate
    if: github.event_name == 'push'
    runs-on: ubuntu-24.04
    permissions:
      contents: read
      id-token: write   # lets the job request an OIDC token
    steps:
      - uses: actions/checkout@v4
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789012:role/gha-deploy
          aws-region: eu-west-1
      - id: ecr
        uses: aws-actions/amazon-ecr-login@v2
      - run: |
          docker build -t "${{ steps.ecr.outputs.registry }}/app:${{ github.sha }}" .
          docker push "${{ steps.ecr.outputs.registry }}/app:${{ github.sha }}"

The workflow-level permissions: contents: read sets a minimal default, and only the job that talks to AWS gets id-token: write. No AWS access key is stored anywhere. Images are tagged with the commit SHA, so a rollback is a redeploy of a known tag. In a real repo you would also pin third-party actions to a full commit SHA rather than a version tag. Mention that in the README even if you keep tags for readability.

Terraform: pinned versions, remote state, scoped trust

terraform {
  required_version = ">= 1.11"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }

  # Remote state. Local state is used for this demo; to switch, create
  # the bucket once (versioning on), uncomment, run terraform init -migrate-state.
  # backend "s3" {
  #   bucket       = "CHANGE-ME-tfstate"
  #   key          = "take-home/terraform.tfstate"
  #   region       = "eu-west-1"
  #   encrypt      = true
  #   use_lockfile = true
  # }
}

resource "aws_iam_openid_connect_provider" "github" {
  url            = "https://token.actions.githubusercontent.com"
  client_id_list = ["sts.amazonaws.com"]
}

data "aws_iam_policy_document" "gha_trust" {
  statement {
    actions = ["sts:AssumeRoleWithWebIdentity"]
    principals {
      type        = "Federated"
      identifiers = [aws_iam_openid_connect_provider.github.arn]
    }
    condition {
      test     = "StringEquals"
      variable = "token.actions.githubusercontent.com:aud"
      values   = ["sts.amazonaws.com"]
    }
    # Only the main branch of this one repo can assume the role
    condition {
      test     = "StringEquals"
      variable = "token.actions.githubusercontent.com:sub"
      values   = ["repo:${var.github_repo}:ref:refs/heads/main"]
    }
  }
}

resource "aws_iam_role" "gha_deploy" {
  name               = "gha-deploy"
  assume_role_policy = data.aws_iam_policy_document.gha_trust.json
}

The sub condition is the part reviewers look for. Without it, any GitHub repository could request a token for your role. The role's permissions policy (not shown) should be limited to pushing to one ECR repository and updating one ECS service. An AWS account can have only one OIDC provider per URL, so if the sandbox account already has one, reference it with a data source instead of creating it. Say which you did in the README.

For why each default matters, the terraform state in git and github actions OIDC vs keys challenges argue both sides, and the free remote state guide covers backend setup in more depth.

Common mistakes that fail candidates

Each of these is cheap to avoid, and each one is easy for a reviewer to spot.

  • Committing .tfstate, .env or terraform.tfvars with real values. State holds secrets in plaintext. Add a .gitignore in your first commit, before any of these files exist.
  • Hardcoded keys. An access key in a provider block or a workflow file is an instant fail at many companies. If it ever happened, deleting the file is not enough. The key is in history, and on a public repo you should assume it was scraped. Rotate it first. The leaked credentials challenge walks through the order.
  • 0.0.0.0/0 on SSH or a database port. Use SSM Session Manager, or restrict to a variable holding the reviewer's IP. The same instinct gets tested in the open database port challenge.
  • latest tags on base images, providers, Helm charts or actions. The submission might build today and break next month, and the reviewer may run it next month.
  • A 20-tool stack for a 4-hour task. Terraform plus Terragrunt plus ArgoCD plus a service mesh plus a self-hosted observability stack reads as poor scoping, not skill. Use what the problem needs and name the rest in "with more time".
  • No teardown. If the reviewer cannot remove what you created with one command, you have handed them a cleanup job and a bill.
  • No README, or a README that does not match the code. If the README says make up and there is no Makefile, the review starts badly.
  • Skipping tests to save time. Even one smoke test that curls the health endpoint in CI beats none. The skip tests to ship challenge is the same trade-off in a production setting.

For more Docker and AWS decisions you may need to defend, the Docker scenario-based interview questions and AWS DevOps scenario-based interview questions posts work through them with commands. If your assignment is Terraform-heavy, the Terraform interview questions hub collects the scenarios in one place.

The follow-up review call

Many companies follow a take home with a review call, usually with one or two engineers who have read your code. This is where the assignment is really decided. The code shows what you built. The call shows whether you understood why.

Expect questions like these:

  • "Why not X?" Why ECS and not EKS, why GitHub Actions and not the CI they use, why a single NAT gateway.
  • "What breaks at 10x traffic?" Usually the database connection count, a single NAT gateway, autoscaling that reacts too slowly, or logs nobody can search.
  • "How would you roll back?" If you tagged images with the git SHA, the answer is redeploy the previous SHA. If you used latest, you have no good answer.
  • "What would you change for production?" This is your "What I would do with more time" section, read out loud and expanded.
  • "Walk me through this line." They will pick something non-obvious, like an IAM condition or a depends_on, and ask why it is there.

How to answer without getting defensive:

  1. State the reason, then the cost. "I picked Fargate because there is one service and no cluster to maintain. The cost is less control over the host and a higher per-unit price at scale."
  2. Say what would change your mind. "If there were ten services with a shared platform team, I would look at EKS." This turns "why not X" into a conversation about conditions instead of a defense of a choice.
  3. Concede real mistakes quickly. If they find a bug, say so, say how you would have caught it (a test, a linter, a plan review), and move on. Arguing about a real bug costs more than the bug.
  4. Hold correct positions under pressure. Some pushback is a test. "Why not just commit the state file, it is a small project?" has a right answer, and folding to it is a worse signal than politely disagreeing.

That last point is the hardest one, and it is a skill you can practice before the call.

Practicing under pushback

Writing a good submission is the part you control alone. The review call is different: an engineer argues for the shortcut and watches whether you can explain why you did not take it. A general chatbot makes up an answer on the spot. DevOps Ledger grades you against an answer key written before you started. The challenges linked in this post are the same decisions a reviewer will poke at, such as state in git, keys in CI and an open database port, and in each one you defend your call against that kind of pushback and see which arguments held up.

FAQ

How long should a DevOps take home assignment take?

As long as the brief says, and treat that as a budget. If it says 3-4 hours, spend about that on the build and a bit more on the README and a fresh-clone test. If you go well over, note it honestly and list what you would cut. A tightly scoped submission usually beats a sprawling one.

Is it OK to use AI on a take home assignment?

Follow the company's stated rules. Some allow AI tools, some ask you to disclose them, some forbid them. Whatever the policy, you must be able to explain every line in the review call, because that is where they will ask. Code you cannot explain counts against you either way.

Should I ask questions before starting?

Yes, once, early, in a single message. Ask about anything that changes the design: which cloud account or region, whether a real deploy is expected, which tools are allowed. Then write your assumptions in the README so the submission still makes sense if the answer is slow.

Do I need to deploy to a real cloud account?

Only if the brief asks for it or gives you a sandbox. Otherwise, a local path (docker compose, kind or minikube) plus Terraform that passes validate and plan is usually fine. Say clearly in the README what you ran for real and what you only validated.

What if I run out of time before finishing?

Submit what runs, not what almost runs. Make sure the finished parts work from the README, then list the unfinished parts under "What I would do with more time" with a sentence on how you would do each one. A working subset with honest notes beats a broken whole.

Practice these scenarios

Free guides to read next

Practice defending your decisions

DevOps Ledger is a scenario-based DevOps and SRE interview practice platform: you pick a real production incident, defend your decision in a chat against a senior-engineer AI that pushes back, and get scored against an answer key written before you started.

One payment. 12 months of access. No subscription, nothing renews.

Get full access - $19