Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias authored Oct 24, 2024
1 parent 5ddcc7c commit 7d85b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/bastion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ aws ssm terminate-session --session-id <session-id>
Here's a complete example script to retrieve the Bastion instance ID, push the SSH public key, and start a Session Manager session:

```bash
# Asume el rol IAM necesario
# Asume an IAM Role
assume_role_output=$(aws sts assume-role --role-arn arn:aws:iam::<account-id>:role/<role-name> --role-session-name AWSCLI-Session)

# Exporta las credenciales temporales del rol asumido
# Export credentials
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")
Expand Down

0 comments on commit 7d85b99

Please sign in to comment.