deploy-guardian-aws

Deploy and troubleshoot the Guardian AWS ECS and RDS stack using Terraform and deploy scripts.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/hduoc2003/leviathan-guardian --skill deploy-guardian-aws-hduoc2003
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: deploy-guardian-aws
Source: https://github.com/hduoc2003/leviathan-guardian/tree/main/.agents/skills/deploy-guardian-aws
Command: npx skills add https://github.com/hduoc2003/leviathan-guardian --skill deploy-guardian-aws-hduoc2003

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deploying and maintaining the Guardian server stack on AWS involves coordinating Terraform, ECS, RDS, ECR, Secrets Manager, and DNS configuration, where stale variables or wrong commands can cause failed or inconsistent deployments. This Skill provides the authoritative commands, variable discipline, and validation steps for operating that stack safely. ## Core Features & Use Cases - Guided Deployments: Runs the repository's aws-deploy.sh workflow for deploys, status checks, log inspection, secret bootstrapping, and cleanup with correct preflight verification. - Variable Discipline: Distinguishes supported deploy-script env vars from TF_VAR_* overrides and flags stale variables like DATABASE_MODE or legacy ECS Postgres naming. - Post-Deploy Validation: Verifies service URLs, /pubkey, gRPC endpoints, ECS task definitions, RDS endpoints, and DNS mode after every deploy. - Use Case: An operator needs to roll out a new server image to the prod stack. The Skill sequences SSO credential refresh, ./scripts/aws-deploy.sh deploy, and post-deploy health checks while recording the Terraform outputs that changed. ## Quick Start Use the deploy-guardian-aws skill to deploy the current stack to AWS and verify the service is healthy afterward.

Frequently Asked Questions about deploy-guardian-aws

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy the Guardian server stack to AWS?▼

Run ./scripts/aws-deploy.sh deploy after verifying AWS identity with aws sts get-caller-identity and loading environment variables from .env. The script provisions or updates the ECS service, RDS instance, and Secrets Manager DATABASE_URL wiring.

How do I update ECS infrastructure without rebuilding the Docker image?▼

Run ./scripts/aws-deploy.sh deploy --skip-build to apply infrastructure or runtime changes without rebuilding and pushing the image. The script still resolves the ECR latest tag to an immutable digest so Terraform produces a new task-definition revision when the image changed.

Should I use terraform apply directly or the deploy script?▼

Prefer ./scripts/aws-deploy.sh over raw terraform apply or destroy for normal operations, since it handles state file separation per STACK_NAME and DEPLOY_STAGE. Use raw Terraform only for explicit debugging or plan inspection tasks.

Which environment variables does the AWS deploy script support?▼

Supported variables include AWS_REGION, STACK_NAME, DEPLOY_STAGE, CPU_ARCHITECTURE, DOMAIN_NAME, ACM_CERTIFICATE_ARN, ROUTE53_ZONE_ID, CLOUDFLARE_ZONE_ID, and GUARDIAN_* runtime settings. Use TF_VAR_* only for Terraform variables the script does not map directly, such as RDS sizing or autoscaling limits.

Why is DATABASE_MODE or ECS Postgres configuration not working?▼

DATABASE_MODE and legacy ECS Postgres variables like TF_VAR_postgres_service_name are stale and no longer supported. The current stack is RDS-backed only, and old ECS-hosted Postgres data requires an operator-managed cutover outside the standard Terraform design.

What should I verify after an AWS deployment completes?▼

Run ./scripts/aws-deploy.sh status, then verify the root URL, /pubkey endpoint, and gRPC endpoint when HTTPS is enabled. Also confirm the ECS task definition or image reference, the RDS endpoint or RDS Proxy usage, and whether the active URL is the ALB DNS name or custom domain.