aws-ecs

aws-ecs is a cursor rule for Cursor from sanjeed5/awesome-cursor-rules-mdc. It costs 2,640 tokens per session, scanned A, original, CC0-1.0.

A set of rules for building and running applications with AWS ECS, Amazon's service for running containers. It emphasizes fixed container images, secure secrets, and reliable operations.

In plain words
What is it for?
Use it when writing Dockerfiles, building container images, deploying services to ECS, or managing application secrets.
Why use it?
It helps make deployments repeatable and rollbacks easier while reducing runtime changes and unsafe handling of secrets.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

About the project

awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.

sanjeed5/awesome-cursor-rules-mdc · 3,571 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/aws-ecs
Clone the repo
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdc

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aws-ecs

README.md
[![agentmods](https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/aws-ecs.svg)](https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/aws-ecs)
Your own site
<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/aws-ecs"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/aws-ecs.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,640 This file is loaded in full into every session.
When invoked 2,640 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02640 $0.02640
Opus 5 $0.01320 $0.01320
Sonnet 5 $0.00528 $0.00528
Haiku 4.5 $0.00264 $0.00264

Measured 6d ago against content hash e256f4707e40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

aws-ecs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"command": ["CMD-SHELL", "curl -f http://localhost:3000/health || exit 1"],
rules-mdc/aws-ecs.mdc · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.

aws-ecs Best Practices

This guide outlines the definitive best practices for developing and deploying applications on Amazon Elastic Container Service (ECS). Adhere to these principles to ensure your applications are secure, performant, and maintainable.

1. Code Organization and Structure

1.1. Immutable Container Images

Always build immutable container images. Any change to code or dependencies must trigger a new image build and deployment. This ensures reproducibility and simplifies rollbacks.

❌ BAD: Modifying container contents at runtime (e.g., downloading dependencies on startup).

# Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package.json .
RUN npm install # Installs dependencies during build
COPY . .
CMD ["sh", "-c", "npm install && npm start"] # Re-installs on every run!

✅ GOOD: Bake all dependencies into the image during the build process.

# Dockerfile
FROM node:18-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev # Install production dependencies
COPY . .
RUN npm run build # Build application assets

FROM node:18-alpine AS runner
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist # Copy built assets
EXPOSE 3000
CMD ["node", "dist/main.js"] # Run the built application

1.2. Single Process Per Container

Each container must run only one foreground application process. This allows ECS to effectively manage the container's lifecycle, health checks, and resource allocation.

❌ BAD: Using process managers like supervisord to run multiple applications.

# Dockerfile
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
# supervisord.conf might start Nginx, a Python app, and a cron job.

✅ GOOD: Decouple services into separate containers and task definitions.

# Dockerfile for a single application
CMD ["python", "app.py"]

Context: If services are tightly coupled (e.g., a web server and a sidecar agent that must run on the same host), use a multi-container task definition. Otherwise, deploy them as separate services.

Read the full file on GitHub · 340 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 340 lines · 0 tokens per session scan A e256f4707e40

Subscribe to this mod's changes

aws-ecs is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,640 tokens to every session, about $0.0132 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.