DEV Community

Cover image for How to create a bucket in AWS S3?
Kauana Tombolato
Kauana Tombolato

Posted on

How to create a bucket in AWS S3?

What are buckets and AWS S3?

Amazon S3 (Simple Storage Service) is a reliable, scalable, and secure way to store your files, offered by AWS (Amazon Web Services). It's designed to help you quickly store and access data, making life easier for developers who need an efficient way to manage files.

In S3, files are stored in "buckets," which are like containers for your data. Whether you're dealing with images, videos, documents, or backups, buckets keep everything organized. Each bucket has a unique name, so you can store and access your files from anywhere in the world. Plus, you can set up security policies, manage access, enable versioning, and more to ensure your data is safe and easily accessible.

Ready to create your own bucket on AWS? Let’s jump right in!

Step 1: Log in to the AWS System


Step 2: Select the S3 Service

Selecting the S3 Service


Step 3: Click the "Create Bucket" Button

Creating a Bucket


Step 4: Configure and create the Bucket

  • Region: Ensure that the region aligns with your expectations. This is the geographic location where your files will be physically stored on servers.
  • Bucket Name: The bucket name must be globally unique, so you need to create a name that hasn't been used yet.
    Configuring a Bucket

  • Create the Bucket.
    Creating the Bucket


Step 5: Locate the Bucket to Access It

  • Click on the bucket name to view more information. Looking for bucket created

Step 6: Navigate to "Permissions"

Navigating to


Step 7: Enable CORS

  • Scroll to the bottom of the page where you should find CORS. Click "Edit".
    Clicking in Edit of CORS

  • Insert the following configuration:

[
    {
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "HEAD",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "AllowedHeaders": [
            "*"
        ],
        "MaxAgeSeconds": 3000
    }
]
Enter fullscreen mode Exit fullscreen mode
  • You can also edit this configuration to use your own domain or a list of domains you want to allow access, especially if you plan to use it in production.

  • Save the modified file.
    Saving modified file

Now, our S3 Bucket is ready.


References:

For more information on Buckets & AWS S3, please access to the official Amazon S3 web site.

Top comments (0)