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

securitywing

Menu
  • About
  • Must Read
      • IIS Performance Boost
      • RFID Security
      • Web App Security Testing
      • How to Secure Home Network
      • Prevent Cross-Site Scripting Attacks
      • Renew Self-Signed Certificates
      • Penetration Testing Tools
      • VPN Concentrator
      • Forensic Investigation Tools
      • Digital Certificates
      • Cloud Security Issues
      • Advanced Evasion Prevention
      • Firewall Types
      • Tips to Prevent Data Exfiltration
      • Classified Info Handling
      • MySQL Security
      • Definition of 7 Types of Malware
      • VOIP Security
      • Why Antivirus Software Fails
      • 15 Network Security Vulnerabilities
      • Web App Security
      • IT Security Standards
      • Types of Virtualization
      • Android Security
      • Digital Signature
      • Advanced Malware Protection
    • Close
  • Consultancy
  • Contact

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:

  • How to Resolve Route 53 Privated Hosted zone from a VPC in a different AWS account
  • How to Enable AWS Cross Account ECR Image Replication
  • How to Mount Amazon EFS in EC2-CentOS Instance
  • How to Setup AWS CloudFront for Externally Registered Domain Name
  • How to Setup SSL in AWS application load balancer for WordPress

Filed Under: AWS Tagged With: AWS, boto3

Primary Sidebar

CISSP Sample Test

Take a CISSP Sample Test

CISA IT governance Sample test



Twitter Follow @securitywing

Categories

  • AWS
  • containers
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Network Security Tips
  • Off Track
  • Telecom
  • Tutorial

Pages

  • About
  • Best IT Security Certification Exam
  • CISA IT governance Sample test
  • CISA Sample Test
  • CISSP Sample Test Online
  • Consultancy
  • Contact

Popular Posts

  • 3 Steps to Install Miniku...
  • 8 Effective Ways to Impro...
  • How to Renew Self-Signed...
  • Yahoo Mail Security Setti...
  • How to install a new Goda...
  • How to Setup AWS CloudFro...
  • Host Based IDS vs Network...
  • 11 Essential Skills of an...
  • 63 Web Application Securi...
  • 3 Simple Steps to Capture...

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 data database email firewall gmail hsrp ids iis informaiton internet it kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server SSL switch test tools vpn vrrp web webserver website windows wordpress

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