TL;DR

Container Deployment to AWS is a devops workflow that chains Docker + AWS to automate a common task. Build, tag, push to ECR and deploy to ECS in one automated pipeline triggered by a git tag or manual dispatch. Once configured, it runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.

🐳☁️
DevOpsAdvanced

Container Deployment to AWS

Build, tag, push to ECR and deploy to ECS in one automated pipeline triggered by a git tag or manual dispatch.

30 min setup, fully automated deployments2 MCPs required

How it works

🐳Docker
☁️AWS
Automated
1Build Docker image from Dockerfile2Tag image with git SHA3Push image to Amazon ECR+3 more steps

Local CLI only

None of these MCPs are hosted yet. Install and run the recipe locally:

mcpizy recipe install docker-aws-container-deploy

Why this combo?

Docker packages your application into a reproducible image, and AWS ECS runs it at scale. Combining them through MCPs lets you go from git tag to live container without touching the AWS console or writing bespoke shell scripts. The SHA-based tagging ensures every deployment is fully traceable.

Without this workflow

Manually build image, tag it, push to ECR, update task definition in AWS console, trigger deployment, watch logs and pray.

With MCPizy

Push a git tag. The pipeline builds, pushes, deploys, health-checks, and notifies — end to end in one click.

Business value

Concrete ROI — not marketing fluff.

Time saved

  • Removes the 'senior-only' deploy bottleneck — any engineer can ship safely
  • SHA-tagged images provide forensic-grade traceability for any production issue

Workflow steps

  1. 1
    Build Docker image from Dockerfile
  2. 2
    Tag image with git SHA
  3. 3
    Push image to Amazon ECR
  4. 4
    Update ECS task definition
  5. 5
    Trigger rolling ECS service update
  6. 6
    Health-check new tasks and notify on failure

Use cases

  • Zero-downtime rolling deployments triggered by git tags
  • Instant rollback by redeploying the previous SHA-tagged image
  • Multi-environment promotion (staging → prod) with a single command
  • Automated health checks that auto-rollback on failure

MCPs required

🐳

Docker

Docker MCP Server

View
☁️

AWS

AWS MCP Server

View

Agent prompt (copy into Claude Code)

This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.

You are a container deployment agent. Triggered on git tag push (release tags: v*).

Given the git SHA and tag:
1. Call docker.build_image(context=".", tag="${ECR_REPO}:${SHA}") — fail if build errors
2. Call docker.push_image(tag) to push to Amazon ECR
3. Call aws.ecs_update_service(cluster, service, image=tag, force_new_deployment=true)
4. Poll aws.ecs_describe_services every 20s until deploymentStatus === "PRIMARY" stable (timeout 10min)
5. On failure: call aws.ecs_update_service with previous image tag (rollback) and report the error
6. Report final status: "Deployed <tag> → <service> — health: <count>/<desired> healthy"

Never deploy if tests haven't run (check CI status via preflight).

Trigger & credentials

How this workflow fires and what env vars you need.

.env.example
Event-drivenTrigger
Git tag push matching v*.*.* (add to CI pipeline or run manually with mcpizy recipe run)
🐳Docker· 1 var
DOCKER_HOST

Docker daemon socket (defaults to unix:///var/run/docker.sock)

e.g. unix:///var/run/docker.sock

☁️AWS· 6 vars
AWS_ACCESS_KEY_IDGet key

AWS access key with ECR + ECS permissions

e.g. AKIA...

AWS_SECRET_ACCESS_KEY

AWS secret access key

e.g. wJalrXUtnFEMI/...

AWS_REGION

Region where ECR + ECS live

e.g. us-east-1

ECR_REPOSITORY

ECR repo name

e.g. my-app

ECS_CLUSTER

ECS cluster name

e.g. prod-cluster

ECS_SERVICE

ECS service name

e.g. my-app-svc

One-command deploy

Install everything — MCPs, prompt, env template — in a single call.

$ mcpizy recipe install docker-aws-container-deploy

✓ Installs all 2 MCP servers
✓ Writes prompt to ~/.mcpizy/prompts/docker-aws-container-deploy.md
✓ Generates .env.example in current directory
✓ Ready to paste into Claude Code

Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.

Quick install (MCPs only)

30 min setup, fully automated deployments
$ mcpizy install docker && mcpizy install aws

Frequently asked questions

What is this workflow?

Container Deployment to AWS is a devops automation that uses Docker + AWS together via the Model Context Protocol. Build, tag, push to ECR and deploy to ECS in one automated pipeline triggered by a git tag or manual dispatch.

How long does setup take?

Setup takes around 30 min setup, fully automated deployments. You install the required MCP servers with `mcpizy install docker && mcpizy install aws`, connect your accounts, and the workflow is ready to run.

What does this workflow change in practice?

Removes the 'senior-only' deploy bottleneck — any engineer can ship safely; SHA-tagged images provide forensic-grade traceability for any production issue.

Which MCP servers do I need for this?

You need 2 MCP servers: Docker (mcpizy install docker), AWS (mcpizy install aws). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.

Does this work with Claude Code, Cursor, and Windsurf?

Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.

Start building this workflow

Install the required MCPs from the directory and automate this in 30 min setup.

$ mcpizy install docker && mcpizy install aws

Free to install. Connect your accounts and this workflow runs itself.