Assume AWS IAM role

ASSUME_ROLE_OUTPUT=$(aws sts assume-role \
  --role-arn arn:aws:iam::<account_id>:role/<role_name> \
  --role-session-name foo \
  --duration-seconds 3600 \
)

export AWS_ACCESS_KEY_ID=$(jq -r '.Credentials.AccessKeyId' <<< "$ASSUME_ROLE_OUTPUT")
export AWS_SECRET_ACCESS_KEY=$(jq -r '.Credentials.SecretAccessKey' <<< "$ASSUME_ROLE_OUTPUT")
export AWS_SESSION_TOKEN=$(jq -r '.Credentials.SessionToken' <<< "$ASSUME_ROLE_OUTPUT")