Manage Amazon S3 Buckets with Python in minutes — Part 1

Ramon Marrero
Analytics Vidhya
Published in
3 min readApr 20, 2021

--

Use a familiar programming language like Python to create and access Amazon S3 resources.

Photo by Chris Ried on Unsplash

Introduction

Amazon Web Services (AWS) describes Amazon Simple Storage Service (Amazon S3) as an object storage service that offers scalability, data availability, security, and performance. It serves a myriad of use cases for companies of all sizes and industries from data lakes, mobile applications, websites, backups, archives, enterprise applications and many more.

In this post, we will describe how to use Python (AWS SDK) to perform common operations on S3 buckets.

Create an Amazon S3 bucket

Before creating an Amazon S3 bucket, there are a few thing to consider:

  • The name of an Amazon S3 bucket must be unique across all regions of AWS.
  • When you create a bucket, you choose its name and the AWS Region to create it in. After you create a bucket, you can’t change its name or region.

To interact with AWS Services we use the Python AWS SDK or boto3 library. You use the Boto3 to create, configure, and manage AWS services, such as Amazon Elastic Compute Cloud (Amazon EC2) and Amazon S3.

--

--

Ramon Marrero
Analytics Vidhya

Head of Data Engineering | AWS Community Builder | AWS Certified Solutions Architect | Google Cloud Certified Professional