-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-off.sh
More file actions
31 lines (26 loc) · 1.08 KB
/
debug-off.sh
File metadata and controls
31 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# =============================================================================
# scripts/debug-off.sh — Restore info logging on the AgentCore runtime
# No rebuild required — updates env vars in place.
#
# Usage:
# export RUNTIME_ID=cloudquery_mcp-xxxxxxxx
# export POSTGRES_SECRET_ARN=arn:aws:secretsmanager:...
# ./scripts/debug-off.sh
# =============================================================================
set -euo pipefail
REGION="us-east-1"
: "${RUNTIME_ID:?ERROR: export RUNTIME_ID before running}"
: "${POSTGRES_SECRET_ARN:?ERROR: export POSTGRES_SECRET_ARN before running}"
echo "Restoring info logging on runtime: ${RUNTIME_ID}..."
aws bedrock-agentcore-control update-agent-runtime \
--agent-runtime-id "${RUNTIME_ID}" \
--environment-variables "{
\"AWS_REGION\": \"${REGION}\",
\"HTTP_ADDRESS\": \":8000\",
\"CQAPI_LOG_LEVEL\": \"info\",
\"POSTGRES_SECRET_ARN\": \"${POSTGRES_SECRET_ARN}\"
}" \
--region "${REGION}" \
--output text > /dev/null
echo "✓ Info logging restored"