Add deploy-agentcore.sh: SSO creds + staging sync before agentcore deploy

This commit is contained in:
daniel
2026-05-08 09:31:02 -05:00
parent b728356fe4
commit c3432649c0

17
deploy-agentcore.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")" && pwd)"
# agentcore deploy doesn't honour AWS_PROFILE (SSO); export credentials as env vars
eval "$(aws configure export-credentials --profile ai1 --format env)"
export AWS_REGION=us-east-1
# Sync app source → staging before deploy (staging is gitignored but must be current)
echo "Syncing app/agent_claw_main → agentcore/.cache/agent_claw_main/staging/"
rsync -a --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' \
"$REPO_ROOT/agentclaw/app/agent_claw_main/" \
"$REPO_ROOT/agentclaw/agentcore/.cache/agent_claw_main/staging/"
cd "$REPO_ROOT/agentclaw"
agentcore deploy --yes