fix assume role
This commit is contained in:
parent
a66272c2db
commit
868de6144f
@ -8,11 +8,11 @@ assume-role() {
|
|||||||
export AWS_SECRET_ACCESS_KEY=
|
export AWS_SECRET_ACCESS_KEY=
|
||||||
export AWS_SESSION_TOKEN=
|
export AWS_SESSION_TOKEN=
|
||||||
else
|
else
|
||||||
OUTPUT=$(aws sts assume-role --role-arn $ROLE --role-session-name assumed-role-session --query Credentials --color off --output json)
|
OUTPUT=$(aws sts assume-role --role-arn $ROLE --role-session-name assumed-role-session --query Credentials --output json)
|
||||||
|
|
||||||
export AWS_ACCESS_KEY_ID=$(echo $OUTPUT | jq -r .Credentials.AccessKeyId)
|
export AWS_ACCESS_KEY_ID=$(echo $OUTPUT | jq -r .AccessKeyId)
|
||||||
export AWS_SECRET_ACCESS_KEY=$(echo $OUTPUT | jq -r .Credentials.SecretAccessKey)
|
export AWS_SECRET_ACCESS_KEY=$(echo $OUTPUT | jq -r .SecretAccessKey)
|
||||||
export AWS_SESSION_TOKEN=$(echo $OUTPUT | jq -r .Credentials.SessionToken)
|
export AWS_SESSION_TOKEN=$(echo $OUTPUT | jq -r .SessionToken)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
aws sts get-caller-identity
|
aws sts get-caller-identity
|
||||||
|
Loading…
Reference in New Issue
Block a user