Setting up AWS Command Line Interface
This section lists the commands that have to be executed to configure the Command Line Interface (CLI) for executing the AWS scripts.
Procedure:
- Download AWS CLI.
- From the installed location, configure AWS for general use by providing the details, such as Access Key ID, Secret Access Key, Region and Output Format.
- $ aws configure
- AWS Access Key ID [None]: EXAMPLEKEYID
- AWS Secret Access Key [None]: EXAMPLEKEY
- Default region name [one]: us-west-2
- Default output format [None]:
- The configuration details are stored in the config and credentials files in the USERS directory.
- Download dynamo-db from https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html.
- To launch dynamo-db, run the following command from the installed location.
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
After running the earlier command, you should be able to access dynamo-db from AWS CLI.
- aws dynamodb list-tables
- aws dynamodb scan --table-name example-table-name
In this topic