Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Cloud/Install Boto3 AWS SDK for Python

May 18, 2017

Install Boto3 AWS SDK for Python

Boto3 is the Amazon Web Services (AWS) SDK for Python, which allows Python developers to write software that makes use of Amazon services like S3 and EC2. Boto provides an easy to use, object-oriented API as well as low-level direct service access.

To install on Mac

sudo easy_install pip
sudo pip install —ignore-installed six boto3

sudo easy_install pip sudo pip install —ignore-installed six boto3

You need to set up your credentials and config file to authenticate to AWS first. The files are:

.aws/credentials
.aws/config

After it’s installed and configured, try using Boto3 to fetch your AWS S3 buckets.

import boto3
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():
  print(bucket.name)

import boto3 s3 = boto3.resource('s3') for bucket in s3.buckets.all(): print(bucket.name)

Your S3 buckets will be listed after execution.

Boto3 has access to other AWS resources like EC2, meaning you can start and stop instances via Python and Boto3.

Filed Under: Cloud, Linux Tagged With: aws, boto2, python, sdk

Content delivered to your email

About Me

I'm Ulysses, a Cloud Engineer at Cardinal Health based in Columbus, Ohio. I’m a certified AWS Solutions Architect. This website is my way of documenting the things I have learned in the Cloud. When off the grid, I enjoy riding my electric skateboard. I have surfed, snowboarded and played the saxophone in the past. I hope you will find this site helpful. It's powered by WordPress and hosted in AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021