Add deploy-agentcore.sh: SSO creds + staging sync before agentcore deploy
This commit is contained in:
17
deploy-agentcore.sh
Executable file
17
deploy-agentcore.sh
Executable 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
|
||||||
Reference in New Issue
Block a user