...
In addition to using the AWS Management Console through the portal, you can also access AWS programmatically using the AWS CLI and SDKs. There are two main approaches:
Option 1:
...
For quick, short-term programmatic access:
- Log into the AWS Access Portal using the steps above
- Select your desired AWS account and role
- In the account/role view, click "Command line or programmatic access"
- Choose your preferred option:
- Option 1: Copy and paste the temporary credentials as environment variables
- Option 2: Add the temporary credentials to your
~/.aws/credentialsfile - Option 3: Use the provided
aws configurecommands
Note: These credentials are temporary and will need to be refreshed periodically.
...
AWS CLI SSO Integration (Recommended)
For seamless, long-term programmatic access, configure the AWS CLI to work directly with IAM Identity Center:
...
- Sign in to SSO:
This will open your browser for authentication (same process as portal login).aws sso login --profile dev-account - Sign out when finished:
aws sso logout
Option 2: Temporary Access Keys from the Portal
For quick, short-term programmatic access:
- Log into the AWS Access Portal using the steps above
- Select your desired AWS account and role
- In the account/role view, click "Command line or programmatic access"
- Choose your preferred option:
- Option 1: Copy and paste the temporary credentials as environment variables
- Option 2: Add the temporary credentials to your
~/.aws/credentialsfile - Option 3: Use the provided
aws configurecommands
Note: These credentials are temporary and will need to be refreshed periodically.
Benefits of AWS CLI SSO Integration
...