Skip to content

Commit

Permalink
Merge pull request #17 from rrigato/dev
Browse files Browse the repository at this point in the history
obtain short term credentials using cloudshell
  • Loading branch information
rrigato authored Jul 21, 2024
2 parents d51d40a + 03e44c1 commit a805ff6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/burnday_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- dev
jobs:
run-build-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions scripts/app_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ python -m unittest

deactivate

git push origin dev

echo "pushed to remote"

gh pr create --title "$1" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/burnday_build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ zip $DEPLOYMENT_PACKAGE -r $PROJECT_NAME \
zip -u $DEPLOYMENT_PACKAGE -j handlers/${PROJECT_NAME}_skill.py \
-x *__pycache__* --quiet

zip -u $DEPLOYMENT_PACKAGE -j externals \
zip -u $DEPLOYMENT_PACKAGE -r externals \
-x *__pycache__* --quiet

echo "--------deployment package created--------"
Expand Down
9 changes: 9 additions & 0 deletions scripts/cloudshell_assume_role.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#assume sts role and export the credentials to be used from aws cloudshell
CREDENTIALS=$(
aws sts assume-role --role-arn $ROLE_ARN \
--role-session-name local_debug_session \
)

echo -e "export AWS_ACCESS_KEY_ID=$(echo $CREDENTIALS | jq -r '.Credentials.AccessKeyId')\n\
export AWS_SECRET_ACCESS_KEY=$(echo $CREDENTIALS | jq -r '.Credentials.SecretAccessKey')\n\
export AWS_SESSION_TOKEN=$(echo $CREDENTIALS | jq -r '.Credentials.SessionToken')"

0 comments on commit a805ff6

Please sign in to comment.