How to Query s3 buckets with Python

How to Query s3 buckets with Python

August 19, 2023

Using AWS CLI

You will be able to see the content, which folders there are and so on

#Install aws CLI 
#https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

#Check that it is installed with:
aws --version

#Configure it with the credentials:
aws configure

#Explore the buckets with: 
aws s3 ls

But we came here to query the data, right?

How to Query s3 with Boto and Python

Make sure that you have a solid understanding about Python Dependencies and PySpark:

  1. Get your AWS credentials

  2. Install Python dependencies

pip install boto3