Skip to content

Commit

Permalink
creating access key secret
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie87041 committed Oct 23, 2023
1 parent a0b9c3b commit 4fd8e5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ generate_keys () {
BUCKET_ACCESS_KEY=$(echo $RSP | jq -r '.AccessKey.SecretAccessKey')
echo "BUCKET_ACCESS_ID=$BUCKET_ACCESS_ID" >> $GITHUB_ENV
echo "BUCKET_ACCESS_KEY=$BUCKET_ACCESS_KEY" >> $GITHUB_ENV
# Create a JSON object with BUCKET_ACCESS_ID and BUCKET_ACCESS_KEY
JSON_DATA="{\"BUCKET_ACCESS_ID\":\"$BUCKET_ACCESS_ID\",\"BUCKET_ACCESS_KEY\":\"$BUCKET_ACCESS_KEY\"}"

# Store the JSON object as a SecureString parameter with the user name as the parameter name
aws ssm put-parameter --name "$USER" --type "SecureString" --value "$JSON_DATA" --region your-region
}
populate_bucket () {
DIREXISTS=$(aws s3 ls s3://$BUCKET/templates/ --region $REGION 2>&1)
Expand Down

0 comments on commit 4fd8e5b

Please sign in to comment.