Package: custom-awscli
This package provides a unified command line interface to Amazon Web
Services.Jump to:Getting StartedGetting HelpMore ResourcesGetting StartedThis README is for the AWS CLI version 1. If you are looking for
information about the AWS CLI version 2, please visit thev2
branch.RequirementsThe aws-cli package works on Python versions:3.7.x and greater3.8.x and greater3.9.x and greater3.10.x and greater3.11.x and greaterNoticesOn 2021-01-15, deprecation for Python 2.7 was announced and support was dropped
on 2021-07-15. To avoid disruption, customers using the AWS CLI on Python 2.7 may
need to upgrade their version of Python or pin the version of the AWS CLI. For
more information, see thisblog post.On 2022-05-30, support for Python 3.6 was ended. This follows the
Python Software Foundationend of supportfor the runtime which occurred on 2021-12-23.
For more information, see thisblog post.Attention!We recommend that all customers regularly monitor theAmazon Web
Services Security Bulletins
websitefor
any important security bulletins related to aws-cli.Maintenance and Support for CLI Major VersionsThe AWS CLI version 1 was made generally available on 09/02/2013 and is currently in the full support phase of the availability life cycle.For information about maintenance and support for SDK major versions and their underlying dependencies, see theMaintenance Policysection in theAWS SDKs and Tools Shared Configuration and Credentials Reference Guide.InstallationInstallation of the AWS CLI and its dependencies use a range of packaging
features provided bypipandsetuptools. To ensure smooth installation,
it’s recommended to use:pip: 9.0.2 or greatersetuptools: 36.2.0 or greaterThe safest way to install the AWS CLI is to usepipin avirtualenv:$ python -m pip install awsclior, if you are not installing in avirtualenv, to install globally:$ sudo python -m pip install awsclior for your user:$ python -m pip install --user awscliIf you have the aws-cli package installed and want to upgrade to the
latest version, you can run:$ python -m pip install --upgrade awscliThis will install the aws-cli package as well as all dependencies.NoteOn macOS, if you see an error regarding the version ofsixthat
came withdistutilsin El Capitan, use the--ignore-installedoption:$ sudo python -m pip install awscli --ignore-installed sixOn Linux and Mac OS, the AWS CLI can be installed using abundled
installer.
The AWS CLI can also be installed on Windows via anMSI
Installer.If you want to run thedevelopbranch of the AWS CLI, see theDevelopment Versionsection of
the contributing guide.See theinstallationsection of the AWS CLI User Guide for more information.ConfigurationBefore using the AWS CLI, you need to configure your AWS credentials.
You can do this in several ways:Configuration commandEnvironment variablesShared credentials fileConfig fileIAM RoleThe quickest way to get started is to run theaws configurecommand:$ aws configure
AWS Access Key ID: MYACCESSKEY
AWS Secret Access Key: MYSECRETKEY
Default region name [us-west-2]: us-west-2
Default output format [None]: jsonTo use environment variables, do the following:$ export AWS_ACCESS_KEY_ID=<access_key>
$ export AWS_SECRET_ACCESS_KEY=<secret_key>To use the shared credentials file, create an INI formatted file like
this:[default]
aws_access_key_id=MYACCESSKEY
aws_secret_access_key=MYSECRETKEY

[testing]
aws_access_key_id=MYACCESKEY
aws_secret_access_key=MYSECRETKEYand place it in~/.aws/credentials(or in%UserProfile%\.aws/credentialson Windows). If you wish to place the
shared credentials file in a different location than the one specified
above, you need to tell aws-cli where to find it. Do this by setting the
appropriate environment variable:$ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_fileTo use a config file, create an INI formatted file like this:[default]
aws_access_key_id=<default access key>
aws_secret_access_key=<default secret key>
# Optional, to define default region for this profile.
region=us-west-1

[profile testing]
aws_access_key_id=<testing access key>
aws_secret_access_key=<testing secret key>
region=us-west-2and place it in~/.aws/config(or in%UserProfile%\.aws\configon Windows). If you wish to place the config file in a different
location than the one specified above, you need to tell the AWS CLI
where to find it. Do this by setting the appropriate environment
variable:$ export AWS_CONFIG_FILE=/path/to/config_fileAs you can see, you can have multipleprofilesdefined in both the
shared credentials file and the configuration file. You can then specify
which profile to use by using the--profileoption. If no profile is
specified thedefaultprofile is used.In the config file, except for the default profile, youmustprefix
each config section of a profile group withprofile. For example, if
you have a profile named “testing” the section header would be[profile testing].The final option for credentials is highly recommended if you are using
the AWS CLI on an EC2 instance.IAM
Rolesare a great way to have credentials installed automatically on your
instance. If you are using IAM Roles, the AWS CLI will find and use them
automatically.In addition to credentials, a number of other variables can be
configured either with environment variables, configuration file
entries, or both. See theAWS Tools and SDKs Shared Configuration and
Credentials Reference
Guidefor more information.For more information about configuration options, please refer to theAWS CLI Configuration Variables
topic.
You can access this topic from the AWS CLI as well by runningaws helpconfig-vars.Basic CommandsAn AWS CLI command has the following structure:$ aws <command> <subcommand> [options and parameters]For example, to list S3 buckets, the command would be:$ aws s3 lsTo view help documentation, use one of the following:$ aws help
$ aws <command> help
$ aws <command> <subcommand> helpTo get the version of the AWS CLI:$ aws --versionTo turn on debugging output:$ aws --debug <command> <subcommand>You can read more information on theUsing the AWS
CLIchapter of the AWS CLI User Guide.Command CompletionThe aws-cli package includes a command completion feature for Unix-like
systems. This feature is not automatically installed so you need to
configure it manually. To learn more, read theAWS CLI Command
completion
topic.Getting HelpThe best way to interact with our team is through GitHub. You canopen
an issueand
choose from one of our templates for guidance, bug reports, or feature
requests.You may find help from the community onStack
Overflowwith the tagaws-clior on
theAWS Discussion Forum for
CLI. If you
have a support plan withAWS Support, you can also create
a new support case.Please check for open similarissuesbefore opening
another one.The AWS CLI implements AWS service APIs. For general issues regarding
the services or their limitations, you may find theAmazon Web Services
Discussion Forumshelpful.More ResourcesChangelogAWS CLI
DocumentationAWS CLI User
GuideAWS CLI Command
ReferenceAmazon Web Services Discussion
ForumsAWS Support