Create Your First Credentials for CLI
This section will configure the CLI and its credentials on your computer. UI console is good, but console access is much better as we'll use it 90% of the time.
Prerequisites
Registered AWS account
Install AWS CLI
Now you need to install AWS CLI. You can do it by following official instructions depending on your OS.
Configure your IAM user
Most likely, you're still logged in as the root user. It's time right to fix it!
Open the IAM dashboard and click Users on the left sidebar.
On the "Users" page, click Add Users button.
Specify the user name, and select both the Access key and Password under the AWS credentials type.
On the permissions page, select Attach existing policies directly and choose AdministratorAccess policy from the table (should be the first in the list). It will provide you with almost the same level of access as the root user, and it's ok. It's less likely that you're going to limit access for yourself 😄
On the tags page, hit the Review button and Create user.
You'll see your credentials and a button to download them on the resulting page in a CSV file.
Set your credentials in CLI
Okay, now we can configure your CLI to use your newly created IAM user.
Open the terminal and type aws configure. It will prompt a couple of questions:
Enter your programmatic credentials and, optionally, a region (by default, it will set us-east-1).
That's it! Now you can type aws sts get-caller-identity a command to verify the setup. You should get a response like this:
If you get a similar result - congratulations! Now you're ready to use the full potential of cloud computing.
Last updated
Was this helpful?