# How to use AWS CLI

Below are the steps:

(1) Go to your AWs account

(2) In your account click on security credentials.

(3)Get access key and secret access key by clicking on create Access key.

(4) Download and run the AWS CLI MSI installer for Windows (64-bit):

`C:\> msiexec.exe /i` [`https://awscli.amazonaws.com/AWSCLIV2.msi`](https://awscli.amazonaws.com/AWSCLIV2.msi)

(5) Then follow below steps:

C:\\Windows\\System32&gt; aws configure

AWS Access Key ID \[None\]:

AWS Secret Access Key \[None\]:

Default region name \[None\]:

Default output format \[None\]:

(6) Now AWS CLI is configured and you can try different commands:

[https://docs.aws.amazon.com/cli/latest/reference/](https://docs.aws.amazon.com/cli/latest/reference/)

(7) Example:

C:\\Windows\\System32&gt;aws ec2 stop-instances --instance-ids i-0c03b046c021085f1 --region us-east-1

{ "StoppingInstances": \[

{ "CurrentState": {

"Code": 64,

"Name": "stopping"

},

"InstanceId": "i-0c03b046c021085f1",

"PreviousState": {

"Code": 16,

"Name": "running"

} } \] }
