Prerequisites to use the Amazon CLI version 2
To access Amazon services with the Amazon CLI, you need an Amazon Web Services account with IAM or IAM Identity Center credentials.
When running Amazon CLI commands, the Amazon CLI needs to have access to those Amazon credentials. To
increase the security of your Amazon account, we recommend that you only use short-lived credentials
when using root or IAM users. You should create a user with least privilege to provide access
credentials to the tasks you'll be running in Amazon. For information about best practices, see
Security best practices
Create an IAM or IAM Identity Center administrative account
Before you can configure the Amazon CLI, you need to create an IAM or IAM Identity Center account.
| Choose a way to manage your credentials | To | How to create an account | How to configure programmatic access to the account |
|---|---|---|---|
| Amazon Management Console credentials | Use short-term credentials corresponding to the root user created during initial account set up, an IAM user, or a federated identity from your identity provider. | Open https://portal.aws.amazon.com/billing/signup |
No additional steps are necessary. To sign in to the Amazon CLI with your Amazon account, see Login for Amazon local development using console credentials |
| IAM Identity Center | Use short-term credentials to access Amazon services. | Following the instructions in Getting started in the Amazon IAM Identity Center User Guide. | Configure programmatic access by Configuring the to use in the Amazon IAM Identity Center User Guide. |
| Amazon Identity and Access Management (Not recommended) |
Use long-term credentials to access Amazon services. | Following the instructions in Create an for emergency access in the IAM User Guide. | Configure programmatic access by Manage access keys for users in the IAM User Guide. |
Next steps
After creating an Amazon Web Services account and IAM credentials, to use the Amazon CLI you can do one of the following:
-
Install the latest release of the Amazon CLI version 2 on your computer.
-
Access the Amazon CLI version 2 from your computer using a Docker image.
-
Access the Amazon CLI version 2 in the Amazon console from your browser using Amazon CloudShell. For more information see the Amazon CloudShell User Guide.