.claude/skills/sagerstack-deploy-aws/SKILL.md
AWS infrastructure deployment with Terraform. Use when deploying to AWS, writing Terraform configurations, setting up CI/CD with GitHub Actions, or managing AWS resources (EKS, Lambda, S3, SNS, SQS, Secrets Manager).
npx skillsauth add sagerstack/agentic-sdlc sagerstack:deploy-awsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<essential_principles>
These principles ALWAYS apply when deploying to AWS.
All AWS infrastructure is defined in Terraform. No manual AWS console changes.
terraform/
├── environments/
│ ├── local/ # LocalStack configuration
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ └── terraform.tfvars
│ └── prod/ # Production AWS
│ ├── main.tf
│ ├── variables.tf
│ └── terraform.tfvars
└── modules/ # Reusable modules
├── lambda/
├── s3/
├── sns-sqs/
└── secrets/
| Environment | Infrastructure | Secrets |
|-------------|----------------|---------|
| local | LocalStack | .env.local |
| prod | AWS | Secrets Manager |
Never mix environments. Each has its own Terraform state.
Production secrets are NEVER in code or environment files.
# terraform/modules/secrets/main.tf
resource "aws_secretsmanager_secret" "app_secrets" {
name = "${var.project_name}/${var.environment}/config"
}
# Application code
if environment == "prod":
secrets = secretsManager.getSecret("myapp/prod/config")
apiKey = secrets["binanceApiKey"]
CI/CD pipelines are created only when explicitly requested.
# .github/workflows/deploy.yml
name: Deploy to AWS
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy with Terraform
run: |
cd terraform/environments/prod
terraform init
terraform apply -auto-approve
| Name | Purpose | Tools |
|------|---------|-------|
| local | Development, testing | Docker, LocalStack, Minikube |
| prod | Production | AWS services |
No staging, dev, or other environments. Keep it simple.
# terraform/environments/prod/main.tf
module "lambda" {
source = "../../modules/lambda"
functionName = "trading-lambda"
runtime = "python3.13"
handler = "tradingLambda.lambdaHandler"
# ...
}
module "s3" {
source = "../../modules/s3"
bucketName = "myapp-state"
# ...
}
</essential_principles>
<intake> **What would you like to do?**Wait for response, then read the matching workflow. </intake>
<routing> | Response | Workflow | |----------|----------| | 1, "setup", "terraform", "structure" | `workflows/setup-terraform.md` | | 2, "lambda", "function", "serverless" | `workflows/deploy-lambda.md` | | 3, "s3", "sns", "sqs", "messaging" | `workflows/configure-messaging.md` | | 4, "secrets", "credentials" | `workflows/setup-secrets.md` | | 5, "github", "ci/cd", "actions", "pipeline" | `workflows/setup-github-actions.md` | | 6, "eks", "kubernetes", "k8s" | `workflows/deploy-eks.md` | | 7, other | Clarify, then select workflow or references | </routing><reference_index>
All in references/:
Terraform:
AWS Services:
CI/CD:
<workflows_index>
All in workflows/:
| File | Purpose | |------|---------| | setup-terraform.md | Initialize Terraform project | | deploy-lambda.md | Deploy Lambda functions | | configure-messaging.md | Set up S3, SNS, SQS | | setup-secrets.md | Configure Secrets Manager | | setup-github-actions.md | Create CI/CD pipelines | | deploy-eks.md | Deploy to Kubernetes | </workflows_index>
<verification> ## After Every Deployment# 1. Terraform plan (review changes)
cd terraform/environments/prod
terraform plan
# 2. Apply changes
terraform apply
# 3. Verify resources
aws lambda list-functions
aws s3 ls
aws sns list-topics
aws sqs list-queues
# 4. Test the deployment
# (depends on what was deployed)
</verification>development
Interactive UAT verification skill. Walks the user through acceptance criteria one at a time, records pass/fail/skip results, generates UAT report, and routes remediation gaps to /sagerstack:builder. Solo skill (no agent team).
development
Python code architecture with Vertical Slice + DDD and Clean Architecture. Use when designing Python projects, structuring code, creating domain models, defining bounded contexts, or reviewing architecture. Enforces strict domain purity, CamelCase naming, and proper layer separation.
data-ai
SDLC planning skill that spawns a 4-member agent team to plan one epic at a time from project-context.md. Produces epics, user stories with FR/TR/AC, implementation plans, and critical analyses. Use when planning an epic for full SDLC execution with agent teams.
testing
Testing infrastructure, local environment simulation, and deployment scripts. Use when setting up pytest fixtures, Docker Compose, LocalStack, mocking external services, or creating local deployment scripts. Focuses on HOW to test and run locally, not coding principles (TDD is in software-engineering).