How to use boto3 in your own system (for windows) by creating the credential file:
Rashni Ghosh
AWS || Jenkins(CI/CD) || Docker || Terraform || Git & GitHub || Python(Boto3) || DevOps || Control-M || Rancher
Step 1:
Install python and anaconda.
Step 2:
Open AWS console > Create a new user > Give programmatic access > Add policy as administrator access > Click on create user.
Step 3:
Go to your system (Anaconda should be installed) > Go to C drive > User > Open user (For me it is RASHNI) > Create a folder named ‘.aws’.
Note: It case of any such error as below, follow the below steps.
Create a folder as ‘aws’ > Open command prompt > Type ‘rename aws .aws’ (you can also create directly using mkdir).
Step 4:
Create two files as below:
Note: Type should be ‘File’ only.(Open cmd rename file to change file type too.)
Step 5:
Open credential file using notepad > Paste the below content > Give the details of the user (newly created by you)
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
Note: Download the .csv file as well.
Step 6:
Open config file using notepad > Paste the below content.
[default]
region=us-east-1
output=table
Step 7:
Open ‘anaconda prompt’ > Install the latest Boto3 release via pip:
Use command : 'pip install boto3'
To check type ‘python’ > Use ‘import boto3’ (If it is not throwing any error, CONGRATULATIONS you are done!)