Hướng dẫn dùng boto3 documentation python

You use the AWS SDK for Python [Boto3] to create, configure, and manage AWS services, such as Amazon Elastic Compute Cloud [Amazon EC2] and Amazon Simple Storage Service [Amazon S3]. The SDK provides an object-oriented API as well as low-level access to AWS services.

Note

Documentation and developers tend to refer to the AWS SDK for Python as "Boto3," and this documentation often does so as well.

This guide details the steps needed to install or update the AWS SDK for Python.

The SDK is composed of two key Python packages: Botocore [the library providing the low-level functionality shared between the Python SDK and the AWS CLI] and Boto3 [the package implementing the Python SDK itself].

Note

Documentation and developers tend to refer to the AWS SDK for Python as "Boto3," and this documentation often does so as well.

Installation¶

To use Boto3, you first need to install it and its dependencies.

Install or update Python¶

Before installing Boto3, install Python 3.7 or later; support for Python 3.6 and earlier is deprecated. After the deprecation date listed for each Python version, new releases of Boto3 will not include support for that version of Python. For details, including the deprecation schedule and how to update your project to use Python 3.7, see Migrating to Python 3.

For information about how to get the latest version of Python, see the official Python documentation.

Install Boto3¶

Install the latest Boto3 release via pip:

If your project requires a specific version of Boto3, or has compatibility concerns with certain versions, you may provide constraints when installing:

# Install Boto3 version 1.0 specifically
pip install boto3==1.0.0

# Make sure Boto3 is no older than version 1.15.0
pip install boto3>=1.15.0

# Avoid versions of Boto3 newer than version 1.15.3
pip install boto3

Chủ Đề