#!/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)."