148

I'm new to AWS using Python and I'm trying to learn the boto API however I noticed that there are two major versions/packages for Python. That would be boto and boto3.

What is the difference between the AWS boto and boto3 libraries?

Kyle Bridenstine
  • 4,285
  • 5
  • 42
  • 83
Matt
  • 2,832
  • 4
  • 18
  • 23
  • 13
    More than four years after being asked and two years after being closed, this question and the answer continue to be useful. It's not asking for opinions or recommendations, it's asking a technical question about the difference between two libraries. – Daniele Procida Aug 14 '19 at 06:45
  • 1
    There are several stupidly closed questions, this is one of them – pkaramol Oct 21 '20 at 09:25

1 Answers1

197

The boto package is the hand-coded Python library that has been around since 2006. It is very popular and is fully supported by AWS but because it is hand-coded and there are so many services available (with more appearing all the time) it is difficult to maintain.

So, boto3 is a new version of the boto library based on botocore. All of the low-level interfaces to AWS are driven from JSON service descriptions that are generated automatically from the canonical descriptions of the services. So, the interfaces are always correct and always up to date. There is a resource layer on top of the client-layer that provides a nicer, more Pythonic interface.

The boto3 library is being actively developed by AWS and is the one I would recommend people use if they are starting new development.

garnaat
  • 37,899
  • 7
  • 109
  • 98
  • 13
    In practice AWS services that don't have a Resource layer in boto3 are often easier to handle in boto. YMMV – Atifm Apr 11 '17 at 20:26