Creating S3 Bucket Using CLI

The AWS S3 command is part of the AWS Command Line Interface (CLI) and serves as a tool for interacting with Amazon Simple Storage Service (S3). The AWS s3 mb command creates a new bucket in Amazon S3. It’s a straightforward way to initiate the creation of a storage container within AWS. mb stands for make bucket The bucket name should be globally unique

aws s3 mb s3://<bucket-name> [–options]

Step 1: In this example, we will create a S3 bucket named gfg-example with a default region. Before command execution

s3 buckets before command execution

aws s3 mb s3://gfg-example

Step 2: The above command will create a s3 bucket with default region

S3 bucket creation

s3 buckets after command execution

Step 3: In this example we are creating a s3 bucket with specific region using AWS CLI.

The –region flag in the aws s3 mb command allows us to specify the region of the S3 bucket. By using this flag, we can ensure that the s3 bucket is belongs to specific AWS region. Here I am creating a bucket in the Mumbai (ap-south-1) region.

aws s3 s3://gfg-example2 –region ap-south-1

s3 bucket with specific region

s3 bucket

How to Create AWS S3 Bucket using CLI ?

Amazon S3 is a Simple Storage Service in AWS that stores files of different types like Photos, Audio, and videos, as objects, providing more scalability and security. It allows users to store and retrieve any amount of data at any point in time from anywhere on the web. It facilitates features such as extremely high availability, security, and simple connections to other AWS Services. In this article, we will see how to create s3 buckets using AWS CLI

Similar Reads

Prerequisites

Introduction to s3 AWS CLI...

Creating S3 Bucket Using CLI

The AWS S3 command is part of the AWS Command Line Interface (CLI) and serves as a tool for interacting with Amazon Simple Storage Service (S3). The AWS s3 mb command creates a new bucket in Amazon S3. It’s a straightforward way to initiate the creation of a storage container within AWS. mb stands for make bucket The bucket name should be globally unique...

Uploading or Downloading Objects from S3 Bucket using AWS CLI Commands

The aws s3 cp command can be used for both uploading files to S3 bucket and downloading files from S3 bucket....

Creating S3 Bucket with low level S3 API Command

The s3api is a command that allows users to interact with Amazon Simple Storage Service (S3) through the AWS CLI. With s3api, users can perform advanced operations on S3 buckets and objects such are configure bucket policies, set access control lists (ACLs), manage versioning, configure lifecycle policies, and more....

Create AWS S3 Bucket Using CLI – FAQ’s

What is the use of an AWS S3 Bucket?...