Setting up Boto3 for Python

Prerequisites

  1. python(python >2.7 version or python3 >3.14 version)
  2. pip OR pip3
  3. boto3

Steps to install above in CentOS

  1. Install python via following command
    sudo yum install python OR sudo yum install python3
  2. Install pip via following command
    curl -O https://bootstrap.pypa.io/get-pip.py python get-pip.py --user OR python3 get-pip.py --user
  3. Install boto3 library
    pip install boto3 --upgrade --user OR pip3 install boto3 --upgrade --user

Verify above installations by checking versions by using below commands:

  1. Check python version via following commands
    python --version OR python3 --version
  2. Check pip version via following commands
    pip --version OR pip3 --version

Configure boto3

  1. Create .aws directory to keep config and credentials file using following command $ mkdir ~/.aws
  2. Create aws 'credentials' file as below with correct 'access' and 'secret'
    $ cat ~/.aws/credentials [default] aws_access_key_id = aws_secret_access_key =