From c3432649c01edd303095066357c21cf541e5fb6a Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 8 May 2026 09:31:02 -0500 Subject: [PATCH] Add deploy-agentcore.sh: SSO creds + staging sync before agentcore deploy --- deploy-agentcore.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 deploy-agentcore.sh diff --git a/deploy-agentcore.sh b/deploy-agentcore.sh new file mode 100755 index 0000000..3294aa9 --- /dev/null +++ b/deploy-agentcore.sh @@ -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