Skip to content

How to Create AWS S3 Bucket using Python boto3

How to Create AWS S3 Bucket using Python boto3
Share

Reading Time: < 1 minute

This tutorial will guide you on How to Create AWS S3 Bucket using Python boto3. We consider you already have an AWS account however if you do not have please follow the below tutorial to create an AWS account. Once you have AWS account, You may proceed to create an AWS S3 bucket using Python. You should also create/grant AWS CLI access. Python boto3 is a powerful Python module that can be used programmatically to create AWS resources.

How to Create AWS S3 Bucket using Python boto3

You need to install Python & boto3 to proceed further

You can learn “How to install PIP


import boto3
s3resource = boto3.client('s3')
region = 'us-east-2'
location = {'LocationConstraint': region}
Bucket_Name = "testertechietest-9711112a"
response = s3resource.list_buckets()

class bucket_class:
    for bucket in response['Buckets']:
        bucket_lists1 = {bucket["Name"]}
        print(bucket_lists1)
        bucket_lists1 = bucket_lists1

You can also learn “How to create EC2 instance

You can also learn ” How to Describe EC2 instance using Python boto3

Official S3 Website


Share

Leave a Reply

Your email address will not be published. Required fields are marked *

?>