How to Create an AWS S3 Bucket
Tags: aws, s3, cloud, devops
Published: 2023-04-09 13:54:02

## Introduction
Amazon Simple Storage Service (S3) is a cloud-based storage service provided by Amazon Web Services (AWS). It is designed to store and retrieve any amount of data, from anywhere in the world, at any time. S3 provides a simple web interface that can be used to store and retrieve data objects using standard HTTP or HTTPS protocols. It can be used for a wide range of applications, such as storing backup data, hosting static websites, and serving as a content repository for web and mobile applications.

## Pre-requisites
1. An AWS account

## Steps to create an S3 Bucket
1. Log in to your AWS account and search for S3 in the search bar
![search s3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42ju22jcaq4ewweygkoe.jpg)
2. Navigate to the S3 page and click "Create bucket" 
![click create bucket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abt369vr6fje0itxdagw.jpg) 
3. Choose a unique name for your S3 bucket and select the region in which you want to create your bucket.
![name your bucket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7x4mg2u5qkw2pxxm4lyy.jpg)
It is required that no two AWS S3 buckets have the same name. If you choose a name that is already taken, you will not be able to create your bucket, and you will need to choose a different name.
4. Leave the Object ownership ACL as disabled
![object ownership](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/504qz11xenpb95uibedz.jpg)
Object ACLs are used to set permissions on individual objects within the bucket. You can use object ACLs to grant read, write, or delete access to specific users, groups, or AWS accounts.
5. You can choose to enable or disable public access. 
![block public access](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3vuzyljnrpw6j1l0gpu.jpg)
Public access is disabled by default in AWS S3 buckets to help prevent unauthorized access to your data. When public access is enabled, anyone on the internet can access the data in your S3 bucket, which can put your data at risk.
You can always edit it later to enable public access.
6. You can choose to enable or disable bucket versioning
![bucket versioning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2xhskjkgml871yzreob.jpg)
Bucket versioning is important in AWS S3 because it provides a way to protect against accidental deletion or overwriting of objects in your bucket. With versioning enabled, you are able to recover previous versions of the object if it is accidentally deleted or modified.
We'll leave ours as disabled just for test purposes.
7. Leave the rest of the configurations as is and click create bucket.
8. To upload objects into your bucket, click on your bucket, and click upload
![upload objects](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kan59ikqz4r55ah4khb0.jpg)
You can then drag and drop your objects into your bucket.

## Deleting an S3 bucket
It is important to delete resources when you're done using them. To delete an S3 bucket, you must first empty the bucket of its objects and then delete it.

## Conclusion
In conclusion, AWS S3 offers a wide range of capabilities for storing and managing data in the cloud.
By following the steps outlined in this article, you can create an S3 bucket, upload objects to it, and manage access control to ensure that your data is secure and available. Additionally, it's important to regularly review your AWS environment and delete resources that are no longer needed, to optimize your cloud environment for cost, security, and compliance.