agentleFS
seandkendallseandkendall/kiro-config/skills/deploy-on-aws/SKILL.md

deploy-on-aws

Skill8 starsChanged 41 days agoApache-2.0View on GitHub

Deploy applications to AWS via deploy.sh. Triggers on phrases like: deploy to AWS, deploy.sh, build me a deploy script, host on AWS, run this on AWS, AWS architecture, estimate AWS cost, generate infrastructure. Analyzes any codebase and deploys to optimal AWS services.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Generate: - Write IaC code with security defaults applied

    line 20
  2. Very specific:

    Quality Gate: - Run the Pre-Deployment Quality Gate from development-workflow.md: lint (zero warnings), build (zero warnings), unit tests …

    line 21
  3. Very specific:

    Deploy: - Run security checks (cdk-nag), then execute via deploy.sh

    line 22
  4. Distinctive:

    Default to dev-sized (cost-conscious: small instance sizes, minimal redundancy, single-AZ) unless user says "production-ready".

    line 26
  5. Very specific:

    Use the unified AWS MCP Server (aws-mcp-server, via mcp-proxy-for-aws) for all AWS interactions.

    line 30
  6. Very specific:

    Every project ships a deploy.sh at the root following the full contract documented in steering/aws-deploy-contract.md.

    line 39
  7. Very specific:

    When deploy.sh runs verbose tools (cdk synth, cdk deploy, npm run build), use the side channels so the user sees full progress in the TUI …

    line 59
  8. Very specific:

    Always fall back gracefully: ${AGENT_DISPLAY_OUT:-/dev/stderr} works when not invoked by Kiro.

    line 103
  9. Distinctive:

    Always show cost estimate before generating code

    line 108
  10. Distinctive:

    Run IaC security scans (cdk-nag, cfn-nag) before deployment

    line 110
  11. Distinctive:

    Don't ask "Lambda or Fargate?" — just pick the obvious one

    line 111
  12. Distinctive:

    If genuinely ambiguous, then ask

    line 112
  13. Very specific:

    Use AWS managed KMS keys (aws/service-name) over customer-managed unless there's a specific compliance requirement

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy on AWS

Take any application and deploy it to AWS with minimal user decisions.

Philosophy

Minimize cognitive burden. User has code, wants it on AWS. Pick the most straightforward services. Don't ask questions with obvious answers.

Workflow

  1. Analyze - Scan codebase for framework, database, dependencies
  2. Recommend - Select AWS services, concisely explain rationale
  3. Estimate - Show monthly cost before proceeding
  4. Generate - Write IaC code with security defaults applied
  5. Quality Gate - Run the Pre-Deployment Quality Gate from development-workflow.md: lint (zero warnings), build (zero warnings), unit tests (≥90% coverage), Playwright E2E (target 100%), no deprecation notices, no critical/high vulnerabilities
  6. Deploy - Run security checks (cdk-nag), then execute via deploy.sh

Defaults

Default to dev-sized (cost-conscious: small instance sizes, minimal redundancy, single-AZ) unless user says "production-ready".

MCP Server Usage (AWS Agent Toolkit)

Use the unified AWS MCP Server (aws-mcp-server, via mcp-proxy-for-aws) for all AWS interactions. Resolve the actual callable tool name via tool_search before invoking any of these — see steering/aws-agent-toolkit.md → "Resolving the correct tool name" if a call fails with "Tool is not available":

  • Architecture decisions: the AWS docs-search tool (search_documentation, filter by agent_skills) and the skill-retrieval tool (retrieve_skill) to load curated guidance before designing
  • API knowledge: the AWS docs-search tool (topic current_awareness or reference_documentation) to verify the exact API/CLI syntax — never guess. There is no dedicated "suggest commands" tool; docs search is the current path for this.
  • Cost estimates: the sandboxed-Python tool (run_script) to invoke the Pricing API or Cost Explorer directly — this is the only AWS-API-call tool now (call_aws was removed Aug 31, 2026). Always present costs before generating IaC so the user can adjust before committing
  • IaC validation: the sandboxed-Python tool (run_script) for sandboxed Python checks (e.g., synth a CDK stack and inspect the template)

deploy.sh Contract (MANDATORY)

Every project ships a deploy.sh at the root following the full contract documented in steering/aws-deploy-contract.md. Reference template: skills/deploy-on-aws/references/deploy.sh.template.

Required flags:

FlagPurpose
--profile <name>AWS profile (defaults to default)
--domain <fqdn>Custom domain (saved per profile, recalled next run)
--deleteTear down stack AND deep-clean orphans (S3, log groups, ACM certs, etc.)
-y / --yesAuto-confirm — skip every prompt
-h / --helpShow usage

Per-profile state lives in .deploy-state.json (gitignored). When the user re-runs deploy.sh without --domain, the value saved for the current profile is recalled. Add .deploy-state.json to .gitignore.

Multi-project safety: --delete discovers resources by the project=<name> tag (NOT by name prefix). Resources without that tag are never touched, so sibling projects in the same account are safe. The CDKToolkit bootstrap stack is never destroyed by deploy.sh --delete.

-y is intended for CI-like or fast-iteration usage. Without -y, the script prompts at every destructive step.

Use Agent Output Side Channels (Kiro CLI 2.3.0+)

When deploy.sh runs verbose tools (cdk synth, cdk deploy, npm run build), use the side channels so the user sees full progress in the TUI while the agent's context stays lean (only summary lines):

#!/usr/bin/env bash
# deploy.sh — uses Kiro CLI side channels when present
set -euo pipefail

# Detect side channels (only set when invoked by Kiro agent)
DISPLAY_OUT="${AGENT_DISPLAY_OUT:-/dev/stderr}"
CONTEXT_OUT="${AGENT_CONTEXT_OUT:-/dev/null}"

# Verbose: stream to user TUI but NOT to agent context
echo "==> cdk synth"
cdk synth --profile "$PROFILE" 2>&1 | tee "$DISPLAY_OUT" > /dev/null

echo "==> cdk deploy"
cdk deploy --all --profile "$PROFILE" --require-approval never 2>&1 | tee "$DISPLAY_OUT" > /dev/null

# Concise: summary the agent SHOULD see (via agent_notes)
STACK_NAME=$(cdk list --profile "$PROFILE" | head -1)
ENDPOINT=$(aws cloudformation describe-stacks \
  --stack-name "$STACK_NAME" --profile "$PROFILE" \
  --query 'Stacks[0].Outputs[?OutputKey==`ApiEndpoint`].OutputValue' \
  --output text)

cat <<EOF > "$CONTEXT_OUT"
Stack: $STACK_NAME — DEPLOYED
Profile: $PROFILE
Region: ${AWS_REGION:-us-east-1}
API endpoint: $ENDPOINT
EOF

# Plain stdout — captured normally, agent sees this too
echo "✓ Deploy complete"

How the channels behave:

ChannelUser TUIAgent contextUse for
stdout (default)shownincludedbrief summary lines (one-liners)
$AGENT_DISPLAY_OUTshownNOT includedverbose logs (cdk synth, build output)
$AGENT_CONTEXT_OUTshownincluded as agent_notesstructured facts the agent needs (stack name, endpoint URL, status)

Always fall back gracefully: ${AGENT_DISPLAY_OUT:-/dev/stderr} works when not invoked by Kiro.

Principles

  • Concisely explain why each service was chosen
  • Always show cost estimate before generating code
  • Apply security defaults automatically (encryption, private subnets, least privilege)
  • Run IaC security scans (cdk-nag, cfn-nag) before deployment
  • Don't ask "Lambda or Fargate?" — just pick the obvious one
  • If genuinely ambiguous, then ask
  • Use AWS managed KMS keys (aws/service-name) over customer-managed unless there's a specific compliance requirement

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.