Aws Infrastructure: Install, Source and Security | FunnelSlayer

Aws Infrastructure

Published by kylejryan in better-code

No known issues2 installs

What this skill does

Use this skill when designing, building, reviewing, or troubleshooting AWS infrastructure. Triggers when the user works with SST, CDK, Terraform, CloudFormation, or any AWS infrastructure-as-code tool and wants to make correct architectural decisions. Covers: VPC and networking design, compute selection (Lambda vs ECS vs EKS vs EC2), database selection (DynamoDB vs RDS vs Aurora vs ElastiCache), serverless architecture patterns, scaling strategies, cost optimization, security hardening, IAM, mon

Add Aws Infrastructure to your agent

Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.

Install with a prompt

Paste this into a compatible coding agent:

add this skill "aws-infrastructure" from https://github.com/kylejryan/better-code

Install with the CLI

Run this command in a controlled environment after reviewing the repository:

npx skills add https://github.com/kylejryan/better-code --skill aws-infrastructure

Skill instructions

AWS Infrastructure

Core Philosophy

Good infrastructure makes the right thing easy and the wrong thing hard. It scales without manual intervention, secures by default without extra effort, costs proportionally to usage, and recovers from failures automatically. The goal is infrastructure that the team forgets about — because it just works.

Three forces govern every infrastructure decision:

  1. Will it scale? Not "can it theoretically scale" — will it scale without re-architecture, without downtime, and without an engineer waking up at 3am?
  2. Is it secure by default? Security that requires remembering to enable it will eventually be forgotten. Bake it in so the default path is the secure path.
  3. What does it cost at 10x traffic? An architecture that's cheap at current load but bankrupting at 10x is a trap. Model the cost curve, not just the current bill.

Decision Framework Summary

DecisionDefault ChoiceEscalate When
ComputeLambda (ARM64)> 15 min execution, persistent connections, GPU
Long-running computeECS FargateService mesh, multi-tenant → EKS
Database (key-value)DynamoDB on-demandComplex queries, joins → Aurora Serverless v2
Async messagingSQSFan-out → SNS+SQS, routing → EventBridge
APIAPI Gateway HTTP APIRequest validation, API keys → REST API
NetworkingNo VPC (serverless)RDS, ElastiCache, internal services → VPC

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Architecture DecisionsCRITICALarch-
2Serverless PatternsCRITICALserverless-
3SecurityCRITICALsec-
4Scaling StrategiesHIGHscaling-
5NetworkingHIGHnet-
6Cost OptimizationHIGHcost-
7ObservabilityHIGHobs-
8CI/CD and DeploymentHIGHcicd-
9Multi-Account StrategyMEDIUM-HIGHmulti-
10Operational PatternsMEDIUM-HIGHops-
11Infrastructure ChecklistMEDIUMchecklist-

How to Use

Read individual reference files for detailed explanations, decision trees, and code examples:

references/arch-compute-selection.md
references/arch-database-selection.md
references/sec-iam-least-privilege.md
references/serverless-api-pattern.md
references/scaling-lambda.md
references/net-vpc-design.md
references/cost-big-levers.md
references/_sections.md

Each reference file contains:

  • Detailed decision criteria and trade-offs
  • Incorrect configuration with explanation of the risk
  • Correct configuration with SST/CDK examples
  • Scaling, cost, and security implications

Infrastructure Review Checklist

After designing or reviewing infrastructure, verify:

  • Compute choice justified based on workload characteristics
  • Database choice justified based on access patterns
  • Async processing for operations > 3 seconds
  • DLQ configured for every queue
  • Default-deny auth on all API routes
  • Secrets in SST Secrets or Secrets Manager (never plaintext)
  • Encryption at rest on all storage
  • IAM roles follow least privilege (no * in actions or resources)
  • NAT Gateway costs understood and mitigated
  • Structured JSON logging and X-Ray tracing enabled
  • Alarms on 5xx rate, DLQ depth, throttling, latency
  • removal: "retain" on production stacks

Files included

  • AGENTS.md
  • references/_sections.md
  • references/arch-compute-selection.md
  • references/arch-database-selection.md
  • references/arch-messaging-selection.md
  • references/checklist-infrastructure.md
  • references/cicd-sst-pipeline.md
  • references/cost-big-levers.md
  • references/multi-account-strategy.md
  • references/net-security-groups-endpoints.md
  • references/net-vpc-design.md
  • references/obs-logging-metrics-traces.md
  • references/ops-disaster-recovery-performance.md
  • references/scaling-aurora-ecs.md
  • references/scaling-dynamodb.md
  • references/scaling-lambda.md
  • references/sec-api-security.md
  • references/sec-iam-least-privilege.md
  • references/sec-secrets-encryption.md
  • references/serverless-api-pattern.md
  • references/serverless-background-processing.md
  • references/serverless-event-driven.md
  • SKILL.md

More skills