Add teardown script

This commit is contained in:
2026-07-01 04:58:33 +00:00
parent 781f987b3a
commit 95bbc13d41

19
scripts/teardown.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Tear the demo down. Do this between rebuilds and after the recording so you
# stop paying for Fargate / AgentCore.
set -euo pipefail
cd "$(dirname "$0")/.."
REGION="${REGION:-us-east-1}"
echo "==> Delete AgentCore resources (adjust names to what agentcore_setup created)"
echo " agentcore runtime delete --name hncb-advisor-agent --region ${REGION} || true"
echo " agentcore gateway delete --name hncb-rag-gateway --region ${REGION} || true"
echo "==> Terraform destroy (DynamoDB, Lambda, ECS, IAM)"
terraform -chdir=terraform destroy -auto-approve
echo "==> (optional) delete the Presidio ECR repo"
echo " aws ecr delete-repository --repository-name hncb-presidio --force --region ${REGION} || true"
echo "Teardown complete (mind any S3/CloudFront you created for the UI)."