Create S3 bucket in AWS
Tags: aws, s3, cloud
Published: 2022-02-27 04:18:53


**What is AWS (Amazon Web Service)**

In simple word aws is just a cloud vendor (like other cloud vendor Google GCP and Micrsoft Azure) that work on **pay as you go**. It provide a servers where we can host our website and it can be access remotely from anywhere and many more service are provided by the AWS like - EC2, S3, IOT, ML, VPC, Container, Robotics etc.
[check out all services](https://aws.amazon.com/)




**What is S3 (Simple Storage Service)**

Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and performance. Customers of all sizes and industries can store and protect any amount of data for virtually any use case, such as data lakes, cloud-native applications, and mobile apps. With cost-effective storage classes and easy-to-use management features, you can optimize costs, organize data, and configure fine-tuned access controls to meet specific business, organizational, and compliance requirements.

**What is Bucket**

Bucket is just a kind of container where we can put objects(object means we can say files) and we can also say that it could be a folder that contain some kind of files and folders.

**Prerequisite** 

- [AWS account](https://aws.amazon.com/)

- Basic Knowledge of AWS

- how storage or file system work

- A smile on your face :)


In this article we will discuss two way to create S3 bucket 

1. Through aws s3 dashboard
2. Through aws cli


**Create S3 Bucket with AWS dashboard**

1. Go to s3 dashboard (search S3 on search box and click it)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wq4hrxz4ivwbbwx3lhwj.png)

2. Click on **create bucket** button enter the bucket name and bucket name should be unique because bucket name would not be a duplicate. You can also select specific region in which region you want to create bucket.

By default all public access are blocked but you can unchecked if you want to make bucket public. If you unchecked all option then other user can access all the objects of this particular bucket otherwise no one can access this bucket objects.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqsu99bhjdfn6m5b61ze.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ep92b5m1i3imo0973vxn.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjljclmbyfif5g8b1gmp.png)

At the end click on **create button**. Now you can see that one S3 bucket has added on dashboard.




**Create S3 Bucket through AWS CLI**

To create S3 bucket through AWS CLI you must **install awscli** tool.
[Install AWS CLI (Linux, Mac, Windows)](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

**For the linux user**

go to the terminal and link your machine to the aws account to access all kind of service that provided by amazon aws. run bellow command on terminal.

```
$ aws configure
```

Now go to aws site and in top right side click on your **Name >  Security credentials > Access keys (access key ID and secret access key)** then click on **Create New Access Key** button it will open model after that click on **show access key** or you can also download it.

And when you run aws configure on terminal it would ask bellow thing.

1. AWS Access Key ID
2. AWS Secret Access Key
3. Default region name
4. Default output format

To check connection is establish or not you can run bellow command.

```
$ aws sts get-caller-identity
```

```
{
    "Account": "123456789012", 
    "UserId": "AR#####:#####", 
    "Arn": "arn:aws:sts::123456789012:assumed-role/role-name/role-session-name"
}
```

To check how many s3 bucket exist on you account

```
$ aws s3 ls
```

Create new fresh S3 bucket 

```
$ aws s3 mb s3://bucket_name --region region_name

$ aws s3 mb s3://vishaljipatid --region us-east-2
```

you can change region name and bucket name should be unique.
After that to check that bucket is created or not.

```
$ aws s3 ls
```

And you can also check bucket from aws S3 dashboard.
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vu9i10chiv8tcz5jqvrw.png)

For More information you can follow AWS playlist on youtube
[AWS playlist](https://www.youtube.com/watch?v=DxveVHN4Ymg&list=PLBGx66SQNZ8a_y_CMLHchyHz_R6-6i-i_)