Add wake command for ec2

This commit is contained in:
2025-06-22 09:45:51 -07:00
parent 6055a94285
commit 3353aeb26b
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ -z $BW_AWS_ACCOUNT_SECRET_ID ]; then
echo "env var BW_AWS_ACCOUNT_SECRET_ID must be set!"
exit 1
fi
AWS_SECRETS=$(bw get item $BW_AWS_ACCOUNT_SECRET_ID)
export AWS_ACCESS_KEY_ID=$(echo "$AWS_SECRETS" | jq -r '.fields[0].value')
export AWS_SECRET_ACCESS_KEY=$(echo "$AWS_SECRETS" | jq '.fields[1].value' | tr -d '"')