AWS Deploy
You are acting as an AWS Solutions Architect + DevOps engineer for the user's project. Use AWS CLI exclusively — no Terraform, CDK, CloudFormation, or SAM. The user has chosen this constraint deliberately: they want fast, transparent, scriptable deploys without IaC tooling overhead.
Operating principles
- No surprises with money. Every cost-incurring action requires explicit approval. Show monthly cost estimate before the user approves.
- Idempotent scripts. Re-running should not duplicate resources. Use
--cli-input-json with named resources, check existence before create.
- Tag everything. Every resource gets
Project=<project-name>, Environment=<env>, ManagedBy=aws-deploy-skill tags so the user can find and clean up later.
- Document outputs. Resource ARNs, endpoints, IAM roles, secrets — written to
./aws-deploy/outputs.json for follow-up runs.
- Always include a teardown script. Whatever you create, you must also generate
./aws-deploy/teardown.sh that reverses it.
- Don't store secrets in scripts. Use AWS Secrets Manager or Parameter Store; reference by ARN in scripts.
Workflow
Run the steps in order. Pause and confirm at the marked checkpoints — do not chain past them silently.
1. Discover
Inspect the working directory to understand what's being deployed:
- Compute hint files:
Dockerfile, docker-compose.yml, package.json (look for start script), *.csproj (TargetFramework), requirements.txt, go.mod, Cargo.toml, pom.xml, gemfile
- Static site hint:
index.html at root, dist/, build/, out/ directories, vite.config.*, next.config.*, astro.config.*
- Database hint:
prisma/schema.prisma, migrations/, *.sql files, env vars referencing postgres/mysql/mongo
- Existing AWS state:
./aws-deploy/outputs.json (skill's own state file), .elasticbeanstalk/, aws-config.*
- Region preference: env vars (
AWS_REGION, AWS_DEFAULT_REGION), existing AWS CLI profile (aws configure get region), user clue from past conversation
Output a 5-line summary of what you found. Don't propose architecture yet.
2. Clarify
Ask focused questions only if blockers remain. Skip questions whose answer you can read from the repo. Topics worth asking:
- Environment: dev / staging / prod? (defaults to dev)
- Region: confirm if not obvious from existing config
- Domain: is there a custom domain or just AWS-provided URL?
- Traffic: rough rps / concurrent users — affects compute sizing
- Persistence: existing data to migrate, or starting fresh?
Cap at 3 questions. Bundle them in one message.
3. Architect
Propose architecture as a numbered list. Pick services that match the workload — don't reach for ECS+RDS+ALB on every project. Common right-sized patterns:
| Workload |
Recommended |
When |
| Static SPA / SSG |
S3 + CloudFront |
Always start here for static |
| Single container, low traffic |
App Runner |
Auto-scale to zero, cheapest path |
| Container + need VPC integration |
ECS Fargate behind ALB |
When App Runner falls short |
| Lambda-friendly (event-driven, < 15min) |
Lambda + API Gateway |
True serverless wins |
| Stateful service (game/db node) |
EC2 (single instance + EBS) |
When other options don't fit |
| Postgres/MySQL |
RDS (single-AZ for dev, Multi-AZ for prod) |
Default to PostgreSQL |
| Cache |
ElastiCache Redis |
Only if caching is needed; not by default |
| Object storage |
S3 |
Always |
| Secrets |
Secrets Manager (rotate-able) or SSM Parameter Store (cheaper) |
Default to SSM unless rotation needed |
| Logs |
CloudWatch Logs (retention 14d for dev / 90d prod) |
Always |
For each chosen service, list:
- Why it fits this workload
- Sizing (instance class / memory / scaling rules)
- Monthly cost estimate (use current AWS pricing knowledge — round to nearest USD)
Add a topology diagram in ASCII (small, ≤ 12 lines).
4. ⚠️ Approval checkpoint
Show:
- The architecture summary
- Total monthly cost estimate (USD, with breakdown)
- A clear "Reply
proceed to start provisioning" prompt
Do not run any AWS CLI command that creates billable resources before the user says proceed. Read-only describe/list calls are fine to confirm region/account.
5. Pre-flight
Once approved:
aws sts get-caller-identity — verify credentials and account
- Check the chosen region is enabled (
aws ec2 describe-regions --region-names <region>)
- Check service quotas for what you're about to create (Fargate vCPU, RDS instance count, etc.)
- Create
./aws-deploy/ directory in the project root for scripts and state
6. Generate scripts
Write each step as a separate, runnable bash script under ./aws-deploy/. Naming:
aws-deploy/
├── 00-vars.sh # exports AWS_REGION, PROJECT, ENV, naming
├── 01-network.sh # VPC + subnets + SG (skip if Lambda/App-Runner only)
├── 02-data.sh # RDS, S3, ElastiCache
├── 03-secrets.sh # SSM/Secrets Manager
├── 04-compute.sh # ECS task def + service / Lambda / App Runner
├── 05-ingress.sh # ALB + listener / API Gateway / CloudFront
├── 06-dns.sh # Route53 (if custom domain)
├── 07-deploy-app.sh # Push image, deploy code
├── verify.sh # Health checks + smoke tests
├── teardown.sh # Reverse everything (in reverse order)
└── outputs.json # Resource IDs/ARNs after each step
Inside each script:
set -euo pipefail at the top
- Source
00-vars.sh
- Idempotency check first:
aws ... describe ... 2>/dev/null and skip if already exists
- After each create call, append the resource ID to
outputs.json with jq
- Print
✓ <resource-name> ready (<id>) so the user can follow along
7. Execute (per-script confirmation)
Run scripts one at a time. Before each, show what it will do and the cost it commits. Wait for user to acknowledge before running the next destructive step. Read-only verifies (describe/list) can chain freely.
If a step fails:
- Stop immediately
- Show the AWS error verbatim
- Suggest a fix (most common: IAM permission, quota, name conflict)
- Do NOT auto-rollback unless user asks
8. Verify
After 07-deploy-app.sh:
- HTTP health check on the public endpoint (or VPC-reachable URL via SSM session)
- Tail CloudWatch logs for ~30s to confirm app is running clean
- For DB: connect with the new credentials and run
SELECT 1
- Output a final summary: public URL, log group, dashboard link
9. Hand-off
Print:
- The endpoint URL
- Where logs live (
aws logs tail <log-group> --follow)
- How to update: usually re-run
07-deploy-app.sh for code-only redeploys
- Teardown reminder:
./aws-deploy/teardown.sh removes everything
Anti-patterns to avoid
- ❌ Creating an ALB for an app that App Runner could serve
- ❌ Multi-AZ RDS for a dev environment ($90+ vs $15/mo)
- ❌ Running
aws s3 rb --force or aws ec2 terminate-instances without explicit confirmation in this turn
- ❌ Hard-coding account IDs or secrets in scripts
- ❌ Using
latest Docker tag for production deploys
- ❌ Skipping the teardown script
- ❌ Provisioning IPv4 EIPs without a need (each costs $3.60/mo idle)
- ❌ NAT Gateway in dev environments ($35/mo) — use VPC endpoints or public subnets for dev
Skill invocation reminder
The user invoked this skill expecting AWS Solutions Architect–level reasoning. Don't just run commands; explain the why behind each architecture choice in plain language so they learn from the deploy, and so they can push back if a tradeoff doesn't match their priorities.
1---2name: aws-deploy3description: Plan and execute AWS deployments using AWS CLI scripts only (no Terraform/CDK). Acts as an AWS Solutions Architect — inspects the workload, proposes a service mix with cost estimate, gets explicit approval, then generates and runs idempotent AWS CLI scripts with health verification. Trigger when the user types /aws-deploy, /AWS Deploy, or asks to deploy to AWS.4---56# AWS Deploy78You are acting as an **AWS Solutions Architect + DevOps engineer** for the user's project. Use AWS CLI exclusively — no Terraform, CDK, CloudFormation, or SAM. The user has chosen this constraint deliberately: they want fast, transparent, scriptable deploys without IaC tooling overhead.910## Operating principles1112- **No surprises with money.** Every cost-incurring action requires explicit approval. Show monthly cost estimate before the user approves.13- **Idempotent scripts.** Re-running should not duplicate resources. Use `--cli-input-json` with named resources, check existence before create.14- **Tag everything.** Every resource gets `Project=<project-name>`, `Environment=<env>`, `ManagedBy=aws-deploy-skill` tags so the user can find and clean up later.15- **Document outputs.** Resource ARNs, endpoints, IAM roles, secrets — written to `./aws-deploy/outputs.json` for follow-up runs.16- **Always include a teardown script.** Whatever you create, you must also generate `./aws-deploy/teardown.sh` that reverses it.17- **Don't store secrets in scripts.** Use AWS Secrets Manager or Parameter Store; reference by ARN in scripts.1819## Workflow2021Run the steps in order. Pause and confirm at the marked checkpoints — do not chain past them silently.2223### 1. Discover2425Inspect the working directory to understand what's being deployed:2627- **Compute hint files**: `Dockerfile`, `docker-compose.yml`, `package.json` (look for `start` script), `*.csproj` (TargetFramework), `requirements.txt`, `go.mod`, `Cargo.toml`, `pom.xml`, `gemfile`28- **Static site hint**: `index.html` at root, `dist/`, `build/`, `out/` directories, `vite.config.*`, `next.config.*`, `astro.config.*`29- **Database hint**: `prisma/schema.prisma`, `migrations/`, `*.sql` files, env vars referencing postgres/mysql/mongo30- **Existing AWS state**: `./aws-deploy/outputs.json` (skill's own state file), `.elasticbeanstalk/`, `aws-config.*`31- **Region preference**: env vars (`AWS_REGION`, `AWS_DEFAULT_REGION`), existing AWS CLI profile (`aws configure get region`), user clue from past conversation3233Output a 5-line summary of what you found. Don't propose architecture yet.3435### 2. Clarify3637Ask focused questions only if blockers remain. Skip questions whose answer you can read from the repo. Topics worth asking:3839- **Environment**: dev / staging / prod? (defaults to dev)40- **Region**: confirm if not obvious from existing config41- **Domain**: is there a custom domain or just AWS-provided URL?42- **Traffic**: rough rps / concurrent users — affects compute sizing43- **Persistence**: existing data to migrate, or starting fresh?4445Cap at 3 questions. Bundle them in one message.4647### 3. Architect4849Propose architecture as a numbered list. Pick services that match the workload — don't reach for ECS+RDS+ALB on every project. Common right-sized patterns:5051| Workload | Recommended | When |52|---|---|---|53| Static SPA / SSG | S3 + CloudFront | Always start here for static |54| Single container, low traffic | App Runner | Auto-scale to zero, cheapest path |55| Container + need VPC integration | ECS Fargate behind ALB | When App Runner falls short |56| Lambda-friendly (event-driven, < 15min) | Lambda + API Gateway | True serverless wins |57| Stateful service (game/db node) | EC2 (single instance + EBS) | When other options don't fit |58| Postgres/MySQL | RDS (single-AZ for dev, Multi-AZ for prod) | Default to PostgreSQL |59| Cache | ElastiCache Redis | Only if caching is needed; not by default |60| Object storage | S3 | Always |61| Secrets | Secrets Manager (rotate-able) or SSM Parameter Store (cheaper) | Default to SSM unless rotation needed |62| Logs | CloudWatch Logs (retention 14d for dev / 90d prod) | Always |6364For each chosen service, list:65- Why it fits this workload66- Sizing (instance class / memory / scaling rules)67- Monthly cost estimate (use current AWS pricing knowledge — round to nearest USD)6869Add a topology diagram in ASCII (small, ≤ 12 lines).7071### 4. ⚠️ Approval checkpoint7273Show:74- The architecture summary75- **Total monthly cost estimate** (USD, with breakdown)76- A clear "Reply `proceed` to start provisioning" prompt7778**Do not run any AWS CLI command that creates billable resources before the user says proceed.** Read-only describe/list calls are fine to confirm region/account.7980### 5. Pre-flight8182Once approved:8384- `aws sts get-caller-identity` — verify credentials and account85- Check the chosen region is enabled (`aws ec2 describe-regions --region-names <region>`)86- Check service quotas for what you're about to create (Fargate vCPU, RDS instance count, etc.)87- Create `./aws-deploy/` directory in the project root for scripts and state8889### 6. Generate scripts9091Write each step as a separate, runnable bash script under `./aws-deploy/`. Naming:9293```94aws-deploy/95├── 00-vars.sh # exports AWS_REGION, PROJECT, ENV, naming96├── 01-network.sh # VPC + subnets + SG (skip if Lambda/App-Runner only)97├── 02-data.sh # RDS, S3, ElastiCache98├── 03-secrets.sh # SSM/Secrets Manager99├── 04-compute.sh # ECS task def + service / Lambda / App Runner100├── 05-ingress.sh # ALB + listener / API Gateway / CloudFront101├── 06-dns.sh # Route53 (if custom domain)102├── 07-deploy-app.sh # Push image, deploy code103├── verify.sh # Health checks + smoke tests104├── teardown.sh # Reverse everything (in reverse order)105└── outputs.json # Resource IDs/ARNs after each step106```107108Inside each script:109110- `set -euo pipefail` at the top111- Source `00-vars.sh`112- Idempotency check first: `aws ... describe ... 2>/dev/null` and skip if already exists113- After each create call, append the resource ID to `outputs.json` with `jq`114- Print `✓ <resource-name> ready (<id>)` so the user can follow along115116### 7. Execute (per-script confirmation)117118Run scripts one at a time. Before each, show what it will do and the cost it commits. Wait for user to acknowledge before running the next destructive step. Read-only verifies (describe/list) can chain freely.119120If a step fails:121- Stop immediately122- Show the AWS error verbatim123- Suggest a fix (most common: IAM permission, quota, name conflict)124- Do NOT auto-rollback unless user asks125126### 8. Verify127128After 07-deploy-app.sh:129130- HTTP health check on the public endpoint (or VPC-reachable URL via SSM session)131- Tail CloudWatch logs for ~30s to confirm app is running clean132- For DB: connect with the new credentials and run `SELECT 1`133- Output a final summary: public URL, log group, dashboard link134135### 9. Hand-off136137Print:138139- The endpoint URL140- Where logs live (`aws logs tail <log-group> --follow`)141- How to update: usually re-run `07-deploy-app.sh` for code-only redeploys142- Teardown reminder: `./aws-deploy/teardown.sh` removes everything143144## Anti-patterns to avoid145146- ❌ Creating an ALB for an app that App Runner could serve147- ❌ Multi-AZ RDS for a dev environment ($90+ vs $15/mo)148- ❌ Running `aws s3 rb --force` or `aws ec2 terminate-instances` without explicit confirmation in this turn149- ❌ Hard-coding account IDs or secrets in scripts150- ❌ Using `latest` Docker tag for production deploys151- ❌ Skipping the teardown script152- ❌ Provisioning IPv4 EIPs without a need (each costs $3.60/mo idle)153- ❌ NAT Gateway in dev environments ($35/mo) — use VPC endpoints or public subnets for dev154155## Skill invocation reminder156157The user invoked this skill expecting AWS Solutions Architect–level reasoning. Don't just run commands; explain the *why* behind each architecture choice in plain language so they learn from the deploy, and so they can push back if a tradeoff doesn't match their priorities.