|
@@ -24,8 +24,16 @@ urlencode() {
|
|
|
done
|
|
|
}
|
|
|
|
|
|
+get-credentials() {
|
|
|
+ if command -v aws-vault > /dev/null; then
|
|
|
+ aws-vault export --format=json --duration=8h "$profile-raw"
|
|
|
+ else
|
|
|
+ get-aws-login --profile "$profile" --duration 43200 --output credential_process
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
container=$(container_name)
|
|
|
-credentials=$(get-aws-login --profile "$profile" --duration 43200 --output credential_process | jq -c \
|
|
|
+credentials=$(get-credentials | jq -c \
|
|
|
'{
|
|
|
sessionId: .AccessKeyId,
|
|
|
sessionKey: .SecretAccessKey,
|