Table of Contents
- Introduction
- Prerequisites
- Step 1: Creating and Configuring S3 Bucket
- Step 2: Creating Folders
- Step 3: Uploading Files
- Step 4: Creating Presigned URLs
- Conclusion
Introduction
Simple Storage Service (S3) is a service on Amazon Web Services (AWS) that provides a robust solution for storing, organizing, and accessing files in the cloud. With S3, you can create scalable storage buckets, upload files, and manage access effortlessly. One of the standout features of AWS S3 is the ability to generate presigned URLs, which allow temporary and secure access to files without exposing your bucket or file permissions.
By the end of this guide, you’ll not only have a functional S3 bucket but also the knowledge to share files securely and optimize your storage management strategy. Let's dive in!
Prerequisites
- Go to the AWS management console.
- Sign up if you don't already have an account.
- Sign in to your account with your credentials.
Step 1: Creating and Configuring S3 Bucket
After you're logged in, search S3 and select the highlighted option.
Give the bucket a globally unique name e.g.,
tourism-s3
. (You should go over the bucket naming rules.)For security, we will block public access to our bucket. (Uncheck the box is creating a public bucket.)
Disable bucket versioning. It can be enabled if you need multiple copies of a file stored in the bucket for retrieval purposes.
Let's add a tag for cost management. (Here
Name
is the Key andtourism
is the Value.)For encryption and other settings we leave as default.
We successfully created a bucket. Click on the bucket to open.
Step 2: Creating Folders
Click Create folder and let's create folders to store pictures, tables, & videos.
Give the folder a name
tour-pictures
and click Create folder to save.
Step 3: Uploading Files
Let's upload a table as well. Open the
tour-tables
folder and click Upload.
Click Upload and notice you now have the table in your
tour-tables
folder.
Step 4: Creating Presigned URLs
- Open the image file Uploaded to
tour-pictures
. - Click Object actions at the top right.
Set the Number of minutes or hours you want the presigned URL to last for. Setting ours to 30 minutes.
Now let's do the same for our table. Open the table file in
tour-tables
Click Object actions at the top right.
Just like the image, set the Number of minutes or hours you want the presigned URL to last for. Setting it to 30 minutes here as well.
Paste the URL in a browser to test it works (it should download the table file we uploaded).
Conclusion
In this article, we created an AWS S3 bucket, organized files with folders, uploaded files, and generated presigned URLs for secure sharing. These steps make managing and sharing files in the cloud simple and secure.
With these skills, you’re ready to use AWS S3 effectively and explore more advanced features for your cloud storage needs.
Note: We can delete the S3 bucket after Use for cost-saving purposes
- Select the S3 bucket and click delete.
Thank you for reading my blog.😊😊
If you need further assistance, feel free to reach out in the comment or hit me up on Twitter. You can also follow me on GitHub. My DM's are open and love discussions on cloud topics!😁
: Oluwatofunmi Emmanuel Oluwaloseyi
Top comments (0)