- Install python
- Install pip
- Add python and pip installation to PATH variable
- Install boto3: pip install boto3
- Install AWS-CLI: pip install awscli --upgrade --user
- Configure AWS-CLI for linking account using the command : aws configure
- Create boto3 script and save the file as <boto3_script_name>.py extension
- Run as python <boto3_script_name>.py
The following steps has been captured from the Boto3 Getting Started docs.
Boto3 requires python
version 3
or above and python package installer pip
- Refer official
python
download documentation to install it.- For macos,
brew install python
works good. - For Linux,
apt update && apt install python
might be fine.
- For macos,
- Install
pip
using the official pip install documentation- I've used
get-pip.py
method to installpip
- I've used
- Install boto3:
pip install boto3
orpython3 pip install boto3
- Install AWS CLI by following the instructions here in the docs
- After installing AWS CLI, use
aws configure
command to setup AWS secret key, access key or temporary sts key. - Read more about the AWS boto3 configuration here
- Install AWS-CLI:
pip install awscli --upgrade --user
In addition to the default install of Boto3, you can choose to include the new AWS Common Runtime (CRT). The AWS CRT is a collection of modular packages that serve as a new foundation for AWS SDKs.
To use Boto3, you must first import it and indicate which service or services you’re going to use:
import boto3