DEV Community

Cover image for How to create a presigned URL for an S3 bucket on AWS.
Afeez Adeyemo
Afeez Adeyemo

Posted on

How to create a presigned URL for an S3 bucket on AWS.

This tutorial will guide us on how to create a presigned URL for an Amazon S3 (Simple Storage Service) bucket

What is S3?
S3 means Simple Storage Service on Amazon Web Services (AWS). It is a service that provides secured, scalable, durable and cost-effective object storage.

S3 Bucket

An Amazon S3 bucket is a container for storing objects in Amazon S3. It is similar to Azure Bob container.

Please follow the steps below;

Step 1: Create an S3 bucket
Step 2: Upload an image
Step 3: Create a presigned URL

Step 1: Create an S3 bucket

  • Log-on to AWS Management Console.
  • Search for S3 on the home page. Pick Buckets under Top features.

Search for S3

  • Create bucket

Create Bucket

  • Give the bucket a unique name.

bucket name

  • For Object ownership ** and ensure **ACLs disabled is enabled.

Object ownership

  • Block all public access

public access

  • Disable bucket versioning, and Add tag. Give the key a name add value. Tags are optional, but important for cost management purposes.

bucket versioning and tag

  • For encryption, enable SSE-S3, enable bucket key

Encryption

  • Create bucket

Create bucket

Step 2: Upload an image

  • Select the just created bucket, double click to open it.

Open bucket

  • Upload

Upload

  • For storage class, pick the standard for frequently assessed data.

storage class/standard

  • Add files

Add files

  • Browse for file that will be uploaded from your computer. Select open to upload.

Open to upload

  • Scroll down and upload

Scroll down and upload

  • Wait for the image to be successfully uploaded. Notice that status is succeeded. Double click the file to open.

Succeeded

  • Open

Open

  • Boom! the uploaded file is open

Uploaded file

Step 3: Create a presigned URL
The uploaded file can be viewed VIA a presigned URL.

  • Select the uploaded file. From the Actions drop down menu, select share with a presigned URL.

Share with a presigned URL

  • Set the time interval until the presigned URL expires. Create presigned URL

time interval

  • copy presigned URL

Copy presigned URL

  • Paste the URL in a new tab and enter.

Paste in new tab

Notice you can see the uploaded file.

Please drop comments and questions in comments session.

Top comments (0)