How to create S3 bucket on AWS & Get Credentials
  • Here’s a simple step-by-step guide to help you create an S3 bucket on AWS and get the access credentials.
  • The official AWS documentation for creating an S3 bucket Click Here
  • Sign in to the AWS Management Console, then go to the Amazon S3 Console using this link: https://console.aws.amazon.com/s3/
  • Once you're logged into your AWS account, you'll see the main dashboard where you can explore various AWS services.
  • In the top search bar, type “S3”, and you'll see Amazon S3 appear in the search results (as shown in the image below). Click on it to open the S3 console.
firebase_1
  • Now, click the "Create bucket" button located at the top right corner of the S3 console (as shown in the image below).
firebase_1
  • This will open a setup wizard to create a new bucket, where you'll need to fill in a few details like the bucket name.
  • firebase_1
  • Select the "ACLs disabled" option.
  • firebase_1
  • Then, scroll down to see more settings.
  • Then, uncheck all the checkboxes under "Block Public Access settings for this bucket" to allow public access.
  • Next, a confirmation checkbox will appear. Check this box to confirm your changes (refer to the image below for guidance).
  • firebase_1
  • Don’t change anything else on this page—just leave the other settings as they are.
  • Then scroll down and click the "Create bucket" button to finish setting it up.
  • firebase_1
  • After the bucket is created, you’ll be taken to a new page. You’ll see a green success message at the top, and your newly created bucket will appear in the list below.
  • firebase_1
  • Click on the bucket name from the list, then go to the "Permissions" tab to manage access settings.
  • firebase_1
  • Then, scroll down until you find the "Bucket policy" section under the Permissions tab.
  • Click on the "Edit" button next to the Bucket policy section to add or update the policy.
  • firebase_1
  • We’ll add a few lines of text (bucket policy) in that field. The policy is provided below.
  •                       {
                            "Version": "2012-10-17",
                            "Statement": [
                              {
                                "Sid": "PublicReadGetObject",
                                "Effect": "Allow",
                                "Principal": "*",
                                "Action": "s3:GetObject",
                                "Resource": "arn:aws:s3:::demobucket069/*"
                              }
                            ]
                          }
                            
  • Make sure to update the bucket name in the policy exactly as shown in the example image (highlighted in green). It must match your actual bucket name.
  • After adding the policy, scroll down and click the "Save changes" button to apply it.
  • firebase_1
  • Now, we need to get the necessary AWS credentials.
    • AWS_BUCKET_NAME
    • AWS_REGION
    • AWS_ENDPOINT
    • AWS_HOSTNAME
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
  • Please follow the steps below to get the credentials mentioned above. These will allow your project to securely access the S3 bucket.
How to get required credentials for AWS S3 bucket

Step 1 : How to get "AWS_BUCKET" and "AWS_REGION" from AWS S3 bucket

  • Go to the S3 section in your AWS account.
  • You’ll see your bucket listed there.
    • From this page, you can find:
      • AWS_BUCKET (your bucket name)
      • AWS_REGION (the region where the bucket is hosted)
    • Now you’ve successfully got your AWS_BUCKET and AWS_REGION values. (Refer to the image below)
firebase_1 firebase_1

Step 2 : How to get "AWS_ENDPOINT" and "AWS_HOSTNAME" from AWS S3 bucket

  • Go to the S3 section in your AWS account.
  • You’ll see your bucket listed there.
    • From this page, you can find:
      • AWS_HOSTNAME: Format – https://{bucket-name}.s3.{region}.amazonaws.com Example – https://demobucket069.s3.ap-south-1.amazonaws.com
      • AWS_ENDPOINT: Format – https://s3.{region}.amazonaws.com Example – https://s3.ap-south-1.amazonaws.com
  • Now, make sure to keep those two credentials (AWS_ENDPOINT and AWS_HOSTNAME) safe. You'll need them to activate and use the AWS S3 storage in your project.

Step 3 : How to get "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY" from AWS S3 bucket

  • Go to the search bar at the top of the AWS console and type “IAM”.
  • From the results, click on the IAM service (as shown in the image below). Then, go to the "Users" section in the IAM dashboard.
  • firebase_1
  • In the left sidebar, click on “Users”
  • Click on the blue “Add users” button
  • Set a username (e.g., s3-user)
  • Click Next (Refer to the image below)
  • firebase_1
  • You will see a step called "Set permissions"
  • Choose Attach policies directly
  • In the permissions step, type "AmazonS3FullAccess" in the search box, then check the box next to it to give full S3 access.
  • Click Next
  • firebase_1
  • In the "Review and create" step, click on "Create user".
  • firebase_1
  • Once the user is created, you will see them listed on the next screen. Find and select your new user from that list.
  • firebase_1
  • Click on the user name
  • On the user summary page, click “Security credentials” tab
  • firebase_1
  • Scroll to the “Access keys” section
  • Click “Create access key”
  • firebase_1
  • Choose Use cases (select “Application running outside AWS”)
  • firebase_1
  • Step 2: (Optional) You can add a description tag if you want, or just skip this step.
  • firebase_1
  • Then Click On, Create access key
  • You'll now see:
    • Access key ID
    • Secret access key
  • firebase_1
  • Download the .csv file or copy both values securely — you cannot see the secret again later!
  • Now the bucket is fully configured, and you have all the necessary details and credentials needed to start using it.

Want to talk with us?

Email : [email protected]

Whatsapp : +91 9909515320