# Test ECS services locally against staging | mirrord for ECS > Run your Amazon ECS service locally against the real databases, queues and APIs in staging. No image rebuilds, no deploy loop. Works on Fargate and EC2. Canonical page: https://metalbear.com/mirrord/ecs/ Setup guide: https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs Last updated: 2026-11-16 ## Test on ECS without deploying mirrord lets your coding agent run its changes locally against your real Amazon ECS environment, and know in seconds if they work. mirrord lets code on your laptop or in an agent's sandbox run as if it were inside your ECS task, with the same network, environment, file access, databases and queues. - **No waiting on deploys**: Your agent tests each change against real staging right away. No image to build, no revision to roll out. - **Real staging, not mocks**: Real requests, databases, queues and internal APIs inside your VPC, without a VPN. - **Safe on shared staging**: Only requests tagged with your session key come to you. Everyone else's traffic stays on ECS. ## What one iteration costs - **The usual way**: code, build an image, push it, roll out a new task, then test on staging. Minutes per iteration. - **With mirrord**: code, then test on staging. Seconds per iteration. ## How it works Your code runs on your machine, started by you or your coding agent. mirrord connects it to your ECS task, which has the real network, databases and queues. Set it up once. Your image stays the same. 1. Add mirrord to your task definition 2. Run your service with `mirrord up` 3. Change code and rerun it Secure by design. Nothing connects in to your machine or your task. Security docs: https://metalbear.com/mirrord/docs/managing-mirrord/security ## Works with the coding agent you already use mirrord works with Claude Code, Cursor, Codex and any other agent. Paste this into your agent: > Set up mirrord for ECS on my service, so you can test your changes against our real staging environment. Follow the setup guide at https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs ## Results from teams using mirrord - **SurveyMonkey**: 2x developer velocity. [Case study](https://metalbear.com/mirrord/case-study/surveymonkey/) - **monday.com**: ~$450 saved per dev per month. [Case study](https://metalbear.com/mirrord/case-study/monday/) - **CoLab**: 98% faster dev cycle time. [Case study](https://metalbear.com/mirrord/case-study/colab/) > "mirrord has had as big an impact on development productivity at Cadence as AI has." Eric Hauser, CTO, Cadence > "Our team uses Cursor to write the code, and mirrord to test it in pre-production, in seconds." Alon Gluzman, Senior Platform Engineer, Daylight ## FAQ ### What is mirrord? mirrord is a development platform that connects AI agents and developers to their real staging environment, so they get real-world context and a real feedback loop without deploying. Developers use it from their IDE or terminal, and agents like Claude Code, Cursor and Codex use it to check their own work. The CLI is open source, and 20,000+ engineers already use it with Kubernetes. ### Do I need Kubernetes? No. With [MetalBear Cloud](https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs/ecs-metalbear-cloud), you only need your ECS service and the mirrord CLI. If you already use mirrord on Kubernetes, nothing changes there: you can run ECS sessions [through the mirrord Operator on your EKS cluster](https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs/ecs-operator-hosted), and test your ECS services the same way as the rest. ### What do I need to change in my ECS service? You edit the task definition once: add a shared volume, a small setup container and a few environment variables, then deploy that revision. Your application image stays the same. After that, you test every change against the real service with no further deploys. The [ECS setup guide](https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes/ecs) has the task definition changes, ready to copy. ### Does it work with Fargate? Yes. It works with Linux tasks on both Fargate (platform version 1.3.0 or later) and EC2. Your image needs glibc 2.30 or later, so Debian 11, Ubuntu 20.04, Amazon Linux 2023 and newer work, while Alpine and Amazon Linux 2 don't. ### Will I break staging for everyone else? No. You only get the requests that carry your own session key, in a `baggage` header. Everyone else's traffic keeps going to the deployed service. The [mirrord browser extension](https://metalbear.com/mirrord/docs/using-mirrord/incoming-traffic/filter-incoming-traffic/debug-from-browser) can add the header for you while you click around. ### What if my service runs several tasks? It works, with one limit: your session connects to one task. Requests that land on other tasks aren't sent to you, so for testing, scale the service to one task or send your test traffic to that task. [See the limitations](https://metalbear.com/mirrord/docs/using-mirrord/beyond-kubernetes#limitations). ### Can AI coding agents use it? Yes. An agent like Claude Code, Cursor or Codex can run the service through mirrord, test its change against your real staging environment, read the error and fix it, without waiting for a deploy each time. Install the [mirrord agent skills](https://metalbear.com/mirrord/docs/use-cases/using-mirrord-with-ai/ai-skills-plugin) to teach your agent how to set up and use mirrord. ### Is it secure? Your ECS task and your machine only make outbound HTTPS connections, so there are no inbound ports to open. Each session only receives requests tagged with its own session key. [Read the security details](https://metalbear.com/mirrord/docs/managing-mirrord/security). ### How much does it cost? Right now, mirrord for ECS with MetalBear Cloud is available on every plan, including Free. Running ECS sessions through the mirrord Operator on your own cluster needs the Enterprise plan. [See plans and pricing](https://metalbear.com/mirrord/pricing/). ## Related - [mirrord on Kubernetes](https://metalbear.com/mirrord/) - [Where else mirrord runs](https://metalbear.com/mirrord/beyond/) - [Plans and pricing](https://metalbear.com/mirrord/pricing/)