DEV Community

Cover image for Creating an S3 Bucket in AWS and generate a pre - signed URL
Adebayo Ebofin
Adebayo Ebofin

Posted on

Creating an S3 Bucket in AWS and generate a pre - signed URL

Table of contents

  1. What is an S3 bucket?
  2. What is a pre-signed URL in an S3 bucket in AWS?
  3. Step- by-step in creating S3 bucket
  4. a. creating a folder b. uploading a file
  5. creating a pre-signed URLs

An S3 bucket in AWS (Amazon Web Services) is a logical container for storing objects (files, data, and metadata) in Amazon Simple Storage Service (Amazon S3). It serves as the foundational storage unit in AWS and allows you to store, retrieve, and manage data in a scalable, secure, and cost-effective manner.
A pre-signed URL in the context of an AWS S3 bucket usually refers to a pre-signed URL. A pre-signed URL allows users to access a specific object in an S3 bucket without requiring direct permissions to the bucket.

This is particularly useful when you want to grant temporary, secure access to a private object in S3 for downloading or uploading purposes.

Step by step in creating S3 bucket
*sign up/log in to AWS Console:

Image description
Go to AWS Management Console.
*In the search bar, type "S3" and select S3 from the services list.

Image description
*Click "Create bucket":

Image description

  • Provide Bucket Name: Enter a unique bucket name (e.g., adexbucket).

Image description

  • Select Region: Choose the AWS region where the bucket will be created (e.g., US West 2 *Configure Settings: Leave Block Public Access settings as is (enabled by default).

Image description
*Disable Versioning .You can Enable Versioning as well when you want to keep multiple versions of objects to protect against accidental overwrites, deletions, or data loss.

Image description

  • Add tag :In adding tag, key is the "name" while value "crown"

Image description
*For Encryption and other setting ,leave as default

  • Create bucket Scroll down and click Create bucket.

Image description
*Successfully created bucket. Click on bucket to open

Image description
4a. creating folders
click create a folder to store file, videos, pictures etc

Image description

  • Give the folder a name(adexfolder) and select create folder

Image description

  • create a folder for videos and pictures using the same steps

Image description

Image description
*Successfully created folders for different purposes

Image description
b. uploading file
open the September picture folder and click on upload

Image description
*Click Add file and select the picture then click upload to upload the selected picture

Image description

  • Successful uploaded to September picture

Image description

  • open the October video folder and click on upload

Image description

  • Successful uploaded to October video folder

Image description

  1. Creating pre - signed URLs
  2. Open the image file Uploaded to September-pictures.
  3. Click Object actions at the top right.
  4. In the drop down select Share with a presigned URL.

Image description

  • Set the Number of minutes or hours you want the presigned URL to
    last for. Setting to 45 minutes.

  • Click Create presigned URL.

Image description

  • Successfully created presigned URL

Image description

  • Paste the URL in a browser to test it .

Image description

  • Repeat the same for October video. Open the video file folder for October video
  • Click Object actions at the top right.
  • In the drop down select Share with a presigned URL.

Image description

  • Successfully created presigned URL

Image description

  • Paste the URL in a browser to test it .

Image description

Top comments (0)