Files
agent-claw/deploy-agentcore.sh

18 lines
671 B
Bash
Executable File

#!/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