• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

How to Install Boto3 for AWS SDK using Anaconda in Windows

by wing

Boto3 allows the python developers to create and manage AWS services such as EC2. You may need to install boto3 in your windows machine for AWS cloud based services development and automation. The easiest way to configure boto on your machine is to install anacond at first. You can download anaconda at https://www.anaconda.com/distribution/.

Once you complete downloading and installation anacond, you need to run the following commands in the anaconda command prompt.

#conda install pip

#pip install pipenv

Next, you need to setup AWS CLI. You can download the msi file from https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#install-msi-on-windows.

Once you complete installing AWS CLI, you need to configure aws credentials. You can generate the secret keys from the AWS console and take a note of the aws region.  Next, type the command below on the Anaconda prompt. Remember that you need to use anaconda prompt, not windows command prompt.

# aws configure  – -profile mypython

Note: here ‘mypython’ is the aws profile name I will use later to export in boto.

Type the secret keys and the region.

 

Now that you have completed setting the environment and the aws cli, you can start writing python codes using boto3. To get started, you can configure python virtual environment using python 3.

# pipenv –three

Next install boto3,

# pipenv install boto3

#pipenv install -d ipython

To run ipyton inside pipenv run:

# pipenv run ipython

#import boto3

# session = boto3.Session(profile_name=’mypyhthon’)

To print all ec2 instances in your account, type:

 

#ec2=session.resource(‘ec2’)

# for i in ec2.instances.all():

            print(i)

boto3 in windows 10

If you want to run a python script inside the pip environemnt, you can run:

# pipenv run python mycode.py

To run python code interactively inside a shell:

# pipen shell

#pyton mycode.py

Related posts:

  1. How to Enable AWS Cross Account ECR Image Replication
  2. How to Resolve Route 53 Privated Hosted zone from a VPC in a different AWS account
  3. 3 Easy Steps to Create EKS(kubernetes) Cluster in AWS
  4. Top 10 Actions to Prevent Cyber Defence Evasion on AWS Cloud

Filed Under: AWS Tagged With: AWS, boto3

Primary Sidebar

Please help us sharing

Categories

  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

audit AWS backup basics browser check cisco cloud computer configuration cyber data database email gmail hsrp ids iis informaiton internet kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server social media SSL switch test tools vpn vrrp web webserver website windows wordpress

Copyright © 2010-2025 ·All Rights Reserved · SecurityWing.com