Skip to main content

/ipa.deploy

Deploy a composed infrastructure pattern by executing generated Makefiles in sequence: build, deploy, and post-deploy.

Invocation

/ipa.deploy

Parameters

/ipa.deploy takes no arguments. It reads configuration from .env and executes the Makefiles generated by /ipa.compose.

Prerequisites:

RequirementSource
.env with IPA variables/ipa.init
Security stack deployed/ipa.security
scripts/deploy.mk, scripts/build.mk, scripts/post-deploy.mk/ipa.compose
Prepare stacks deployed/ipa.prepare
AWS credentials validAWS CLI configuration
GNU Make installedSystem dependency

What It Does

  1. Pre-flight validation — Confirms .env exists, required variables are present, Makefiles exist, prepare stacks are deployed, security stack is deployed, AWS credentials are valid, and Make is installed. If prepare stacks are missing, auto-triggers /ipa.prepare.

  2. Display deployment plan — Runs make -n -f scripts/deploy.mk deploy to show the dry-run plan.

  3. Execute build — Runs make -f scripts/build.mk build to build container images and frontend assets. Make handles no-op if builds are current.

  4. Execute deploy — Runs make -f scripts/deploy.mk deploy to deploy stacks in dependency order.

  5. Post-deploy verification — Confirms all stacks reach a *_COMPLETE status via CloudFormation.

  6. Execute post-deploy — Runs make -f scripts/post-deploy.mk post-deploy for configuration generation, S3 upload, CDN invalidation, and auth wiring.

  7. Completion report — Displays stack status, outputs, endpoints, and next steps.

Failure Diagnosis

When a stack deployment fails, /ipa.deploy reads CloudFormation stack events and classifies errors into five categories:

CategoryAuto-Recovery
Permission deniedNo — manual IAM fix required
Validation errorNo — fix template or parameters
Resource conflictNo — resolve naming collision
Stuck rollbackYes — deletes and retries
Transient / throttleYes — waits and retries

Outputs

Deployed CloudFormation stacks as defined by the composed pattern. Typical outputs include:

OutputSource Stack
API URLBackend
App URLFrontend
Queue URLQueue
CloudWatch dashboardsBackend, Queue

Examples

Deploy after composing:

/ipa.deploy

Review the dry-run plan and confirm. The skill builds containers, deploys stacks, and runs post-deploy operations.

Re-deploy after code changes:

/ipa.deploy

Safe to re-run. Already-deployed stacks with no changes are skipped.

  • /ipa.compose — Generates the Makefiles that /ipa.deploy executes
  • /ipa.prepare — Auto-triggered if prepare stacks are missing
  • /ipa.destroy — Tears down what /ipa.deploy created