How to get credentials for working locally, e.g. the AWS CLI
Last updated
Last updated
Developers can get short-lived credentials for working locally (lasting up to 4 hours).
This is meant to reduce the risk profile of lost secrets; e.g. if a laptop is stolen, it's less likely to have useful AWS credentials than if we all had long-lived, permanent credentials.
You can use the aws
CLI application to do this when signing in via IAM Identity Center.
To configure your CLI for single sign on you can:
Follow the instructions to to ensure you have access.
Return to the IAM Identity Center app, or .
Select the "Access Keys" option for the "Digital Engagement Platform" account.
You should see instructions for multiple ways in which to use your temporary credentials. To set up your CLI to work with collection AWS roles, run:
The SSO session name should can be empty. Specify the start URL and region from the instructions. When asked to select a profile name specify default
.
This will create an entry in ~/.aws/config
that looks like:
Ensure that your ~/.aws/credentials
file matches the one in this repository. If there is already a default
profile specified this process will fail.
Once the configuration process is complete you can sign-in using the command:
After sign-in, you will assume an .
You then need to assume a to start doing things.