How do i setup the access keys for aws-cli commands?
-
Link: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html
Link: http://docs.aws.amazon.com/cli/latest/userguide/installing.htmlThe links above, are instructions for creating access keys are found for a particular user and setting up the aws-cli using one of the described methods.
You should now have the aws-cli commands installed. https://www.lightnetics.com/post/613
Note: Keep your access keys in a secure location, only accessible to you.
On your linux or unix server
$ aws configure AWS Access Key ID [None]: XXXXXXXXXXXXX AWS Secret Access Key [None]: XXXXXXXXXXXXXXXXXXXXXXXXX Default region name [None]: us-west-2 Default output format [None]:
This creates a .aws directory with two files in it; in your home directory.
$ cd .aws $ ls config credentials $ ls -ld . drwxrwxr-x 2 user1 testing 4096 Feb 2 08:51 . $ pwd /home/user1/.aws $ chmod 700 . $ ls -ld . drwx------ 2 user1 testing 4096 Feb 2 08:51 .
Run a test command.
$ aws ec2 describe-instances --output table
© Lightnetics 2024