deploy
Builds, validates, and deploys all infrastructure to AWS. Creates real AWS resources that may incur costs.
What this skill does
# Deploy — Ship to AWS You are deploying the user's infrastructure to AWS using CDK. This creates real cloud resources. ## Prerequisites - CDK project exists and compiles (`cdk synth` succeeds) - At least the API stack is configured - AWS CLI is installed and configured with credentials ## What To Do ### Phase 1: Pre-Flight Checks Run these checks and report results: 1. **AWS CLI configured?** ```bash aws sts get-caller-identity ``` - If fails with "expired token" or "credentials": Explain "Your AWS session has expired. If you're using SSO, run `aws sso login` to refresh it. SSO sessions typically last 8-12 hours." - If fails with "not configured": Guide the user through `aws configure sso` - If succeeds: Show the account ID and region, confirm with the user: "I see you're connected to account [ID] in [region]. Is this the right account?" 2. **CDK compiles?** ```bash cd infrastructure && npx cdk synth ``` - If fails: Debug the issue 3. **Common mistake scan:** - Check for wildcard IAM permissions - Check for public S3 bucket policies - Check for hardcoded secrets - Check for missing CORS configuration - Report any issues found ### Phase 2: Plan Show the user exactly what will be created: 1. **Run `cdk diff`:** ```bash cd infrastructure && npx cdk diff ``` 2. **Translate the diff** into plain language: - "This will create [N] Lambda functions..." - "This will create an API Gateway with [N] routes..." - "This will create a DynamoDB table..." - "This will create a CloudFront distribution..." - etc. 3. **Cost estimate:** - List each resource and its free-tier eligibility - Estimate monthly cost for low traffic (likely $0-5) - Remind about cleanup: "Ask me to tear down the resources when you're done to avoid charges" 4. **Explain CDK Bootstrap:** If this is the first CDK deployment in this account/region: "CDK needs a one-time setup called 'bootstrap' — it creates an S3 bucket that CDK uses to store deployment assets. This is required and costs virtually nothing." ### Phase 3: Confirm **Get explicit confirmation before deploying:** "I'm about to create the following AWS resources in account [account-id], region [region]:" - List each resource - "This may incur costs. Shall I proceed?" Wait for user confirmation. Do NOT proceed without it. ### Phase 4: Execute 1. **Bootstrap CDK** (if needed): ```bash cd infrastructure && npx cdk bootstrap ``` Explain what's happening 2. **Deploy all stacks:** ```bash cd infrastructure && npx cdk deploy --all --require-approval never --outputs-file ../.migration/outputs.json ``` - Set time expectations: "Deployment typically takes 3-5 minutes. CloudFront distributions take the longest — up to 5-10 minutes on the first deploy. You'll see progress updates as each resource is created." - Stream progress and explain what's being created - `--require-approval never` because we already confirmed with the user - `--outputs-file` saves stack outputs for reference 3. **Handle errors:** - If deployment fails, read the error, explain it in plain language, and suggest fixes - **"Access Denied"** → "Your AWS user doesn't have permission to create this resource. If you're using SSO, check that your role has admin permissions. If your session expired mid-deploy, run `aws sso login` and try again." - **"Resource already exists"** → "A previous deployment left this resource behind. Check the AWS CloudFormation Console — you may need to delete a stuck stack before redeploying." - **"ExpiredToken"** → "Your AWS session expired during deployment. Run `aws sso login` to refresh, then try deploying again. CDK will pick up where it left off." - **Timeout** → "Some resources take time to create. CloudFront can take up to 15 minutes. This is normal — just wait." ### Phase 5: Post-Deploy 1. **Display outputs:** Read `.migration/outputs.json` and display: - CloudFront URL (the website) - API Gateway URL - Cognito User Pool ID and Client ID (if auth deployed) - DynamoDB table name (if database deployed) 2. **Update frontend config:** - Generate `config.js` with the API URL from outputs - Upload to S3 - Invalidate CloudFront cache 3. **Test the deployment:** - Try to access the CloudFront URL - Try a simple API call - Report results 4. **Guide the user:** - "Your app is live! Visit [URL] to see it" - "Try the API at [URL]/api/..." - "To run comprehensive tests, tell me to test the deployment" - "When you're done, ask me to tear down the resources to stop costs" 5. **Update `.migration/plan.md`** to mark deploy as complete ## Important Notes ### Safety - ALWAYS confirm before deploying - Show the account ID to prevent deploying to wrong account - Run `cdk diff` before `cdk deploy` to show what changes - Save outputs for reference and teardown ### Cost Awareness - Most resources have free-tier eligibility — mention this - Lambda: 1M free requests/month - API Gateway: 1M free calls/month - DynamoDB: 25 GB free storage, 25 read/write units - S3: 5 GB free storage - CloudFront: 1 TB free data transfer - Reminder: free tier is per-account, 12 months for new accounts ### Troubleshooting Common Deploy Issues - "Access Denied" → Check IAM permissions for the deploying user - "Resource already exists" → Stack may be in a broken state, may need manual cleanup - "Timeout" → Some resources take time (CloudFront can take 5-15 minutes) - "Limit exceeded" → Account service limits, may need to request increases
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.