I think you have not initialized the AWS command line before using Ask-cli.
First install the AWS Command Line Interface on your device using the following link : https://docs.aws.amazon.com/cli/latest/userguide/installing.html
Once done please use aws configure command to set up a profile. It will ask you for AWS Access Key ID, AWS Secret Access Key, Default region name and Default output format.
$ aws configure
AWS Access Key ID [None]: *******your key*********
AWS Secret Access Key [None]: *******your key************
Default region name [None]: us-east-1
Default output format [None]: json
To get AWS Access Key ID and AWS Secret Access Key do the following :
- Open the IAM console.
- In the navigation pane of the console, choose Users.
- Choose your IAM user name (not the check box).
- Choose the Security credentials tab and then choose Create access key.
To see the new access key, choose Show. Your credentials will look something like this:
Access key ID: AKIAIOSFODNN7EXAMPLE
Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
To download the key pair, choose Download .csv file. Store the keys in a secure location.
Once set up do the following :
- Run ask init
- Select default profile, hit enter.
- use arrow keys to select default AWS profile you just created.
- It will lead you to amazon.com login page on your browser.sign-in there and your AWS profile will be assigned with your ask-cli.
Now you are ready to use any ask-cli command which also makes changes to your AWS services.
Note: You can initialize multiple AWS and ask profiles on one device. for this use :
- $ aws configure --profile user2 to create a new aws command line
profile.
- Then run ask init again.
- create a new profile and assign your new aws profile to it.
Then to use any ask-cli command on this
new ask-cli profile, use --profile profileName as the suffix of each
ask-cli command. for example :
ask clone --profile secondUser