AWS - CLI
The AWS Command Line Interface (CLI) is a unified tool to manage AWS services from the command line. Using the AWS CLI, you can control multiple AWS services, automate tasks, and manage configurations through profiles.
Set up AWS CLI
Install AWS CLI and configure it for the first time:
This will prompt for:
- AWS Access Key ID
- AWS Secret Access Key
- Default region name
- Default output format
Creating Profiles
You can configure multiple profiles in ~/.aws/credentials
and ~/.aws/config
.
-
~/.aws/credentials
(stores credentials) -
~/.aws/config
(stores region and output settings)
You can also create profiles via the command line:
Using Profiles
When running AWS CLI commands, you can specify which profile to use by adding the --profile
flag:
If no profile is specified, the default profile is used.