How to use AWS CLI
👋 Welcome to my Hashnode blog! I'm a tech enthusiast and cloud advocate with expertise in IT, backup solutions, and cloud technologies. Currently, I’m diving deep into Python and exploring its applications in automation and data management. I share insights, tutorials, and tips on all things tech, aiming to help fellow developers and enthusiasts. Join me on this journey of learning and innovation!
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
(5) Then follow below steps:
C:\Windows\System32> 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/
(7) Example:
C:\Windows\System32>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"
} } ] }