AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Deploy

skill-benja-pauls-serpentstack-deploy · by Benja-Pauls

Build, push, and deploy to AWS using Docker, ECR, and Terraform. Use when: deploying to dev/staging/prod, checking deploy status, rolling back, or running the deploy checklist.

No reviews yet
0 installs
24 views
0.0% view→install

Install

$ agentstack add skill-benja-pauls-serpentstack-deploy

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-benja-pauls-serpentstack-deploy)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Deploy? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Deploy

Build, push, and deploy SerpentStack to AWS using Docker and Terraform.

Environments

  • dev -- automatic deploys from main, auto-approve on apply
  • staging -- manual trigger, shows plan for review before apply
  • prod -- manual trigger, requires plan review before apply

All Terraform config lives in infra/environments/{env}/.

Quick Deploy

make deploy              # Deploy to dev (default)
make deploy env=staging  # Deploy to staging
make deploy env=prod     # Deploy to production

Or use the GitHub Actions CD pipeline — it runs automatically on push to main when AWS credentials are configured as repository secrets.

Step-by-Step Manual Deploy

Step 1: Build Docker Images

docker build -t serpentstack-backend:latest ./backend
docker build -t serpentstack-frontend:latest ./frontend

Tag with the git SHA for traceability:

GIT_SHA=$(git rev-parse --short HEAD)
docker tag serpentstack-backend:latest serpentstack-backend:$GIT_SHA
docker tag serpentstack-frontend:latest serpentstack-frontend:$GIT_SHA

Step 2: Push to ECR

Authenticate with ECR (replace ACCOUNT_ID and REGION):

aws ecr get-login-password --region $AWS_REGION | \
  docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com

Tag and push both images:

docker tag serpentstack-backend:$GIT_SHA $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/serpentstack-backend:$GIT_SHA
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/serpentstack-backend:$GIT_SHA

docker tag serpentstack-frontend:$GIT_SHA $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/serpentstack-frontend:$GIT_SHA
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/serpentstack-frontend:$GIT_SHA

Step 3: Terraform Plan

cd infra/environments/{env}
terraform init
terraform plan -var="app_image_tag=$GIT_SHA" -out=tfplan

Review the plan output carefully. Look for:

  • Resources being destroyed: unexpected destroys indicate a config drift. Investigate before proceeding.
  • Security group changes: verify no ports are being opened unintentionally.
  • Database modifications: any RDS changes should be treated as high-risk.

Step 4: Terraform Apply

Only after the plan is reviewed and approved:

cd infra/environments/{env}
terraform apply tfplan

For dev, the deploy script auto-approves. For staging and prod, always require explicit confirmation.

Step 5: Post-Deploy Health Check

Wait 30 seconds for App Runner to provision the new revision, then verify:

APP_URL=$(cd infra/environments/{env} && terraform output -raw app_url)
curl -sf $APP_URL/api/v1/health | jq .

Expected response:

{"status": "healthy", "version": ""}

If the health check fails:

  1. Check App Runner service logs in the AWS console or via CLI: aws apprunner list-operations --service-arn .
  2. Check if the new revision deployed: aws apprunner describe-service --service-arn | jq '.Service.Status'.
  3. Check CloudWatch logs for the App Runner service.

Step 6: Rollback

If the deploy is broken, revert to the previous image tag:

# Find the previous working tag
PREV_TAG=$(git rev-parse --short HEAD~1)

cd infra/environments/{env}
terraform plan -var="app_image_tag=$PREV_TAG" -out=tfplan-rollback
terraform apply tfplan-rollback

Then verify the health check passes with the rolled-back version.

Checklist

Before deploying to prod:

  • [ ] All tests pass (make test)
  • [ ] Migrations are included and tested on staging
  • [ ] No secrets are hardcoded (check with git diff --cached | grep -i secret)
  • [ ] Health check endpoint returns expected fields
  • [ ] Rollback plan is documented with the previous known-good tag

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.