Read files from Amazon S3 bucket using Python

Ajeet Verma
2 min readJan 23, 2020

--

Amazon S3

Amazon Simple Storage Service (Amazon S3) is a scalable, high-speed, web-based cloud storage service designed for online backup and archiving of data and applications on Amazon Web Services. Amazon S3 was designed with a minimal feature set and created to make web-scale computing easier for developers.

Working with Amazon S3 Buckets

To upload your data (photos, videos, documents etc.) to Amazon S3, you must first create an S3 bucket in one of the AWS Regions. You can then upload any number of objects to the bucket.

In terms of implementation, buckets and objects are resources, and Amazon S3 provides APIs for you to manage them. For example, you can create a bucket and upload objects using the Amazon S3 API. You can also use the Amazon S3 console to perform these operations. The console uses the Amazon S3 APIs to send requests to Amazon S3.

If you want to know more, please check this link

So in simple terms aws S3 is a simple storage service where we can store our data files.

To interact with the services provided by AWS, we have a dedicated library for this in python which is boto3.

Now let’s see how we can read a file(text or csv etc.) stored in s3 bucket in a specific folder. Let’s directly jump on the coding part……….

Install boto3 using : pip install boto3

Please feel free to comment below in case you need more explanation and don’t forget to click the clap button if you like it :) Happy reading!

--

--