Skip to content

Latest commit

 

History

History

aws-cli

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

AWS CLI examples

These are examples for the AWS Command Line Interface (AWS CLI) public documentation. All examples have been tested and verified to work with the AWS CLI version 2.

Prerequisites

To run these examples, you'll need:

  • The AWS CLI, downloaded and running on your machine
  • AWS credentials in a shared credentials file

Running the examples

Examples are typically written as functions in shell script files that can be sourced from other files. When you're done with an example, we do recommend that you check the resources in your account to ensure that the teardown worked as expected and didn't accidentally leave any resources behind.

To run the examples, you need to create a shared credentials file. For more information about how to set up a shared credentials file, see Configuration and Credential File Settings in the AWS CLI User Guide.

Tests

Most examples are accompanied by a unit or integration test script that you can run to validate that each example works. The test scripts include setup and teardown to create and destroy any prerequisite resources. We take care that all AWS resources that the example creates are also destroyed to avoid incurring any unwanted costs.

AWS CLI downloads

For information about how to download and install the AWS CLI, see Installing the AWS CLI in the AWS CLI User Guide.

Documentation

For detailed documentation for the AWS CLI, see the following: