You are on page 1of 7

AWS S3 BUCKETS

Brief Introduction
AWS (S3) is an object storage service with industry-leading scalability, data availability, security, and
performance. Customers of various sizes and sectors may use it to store and secure any quantity of data
for a variety of applications, including data lakes, websites, mobile apps, backup and restore, archiving,
business apps, IoT devices, and big data analytics. S3 has management tools that allow you to optimize,
organize, and customize data access to fit your unique business, organizational, and compliance needs.

 S3 Bucket
An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services'
(AWS) Simple Storage Service (S3), an object storage offering. Amazon S3 buckets, which are
similar to file folders, store objects, which consist of data and its descriptive metadata.

How to properly set buckets to public


We must understand this first, by default, every single S3 buckets would be private, and only authorized
users will access that bucket.

After creating an AWS S3 bucket and then applying the proper bucket policy to it, you will be able to
make that S3 bucket public. To set bucket to public follow the steps mentioned below

1. Create a private S3 bucket if you don't already have one.


2. In the AWS S3 console, click on the bucket that you want to make public.
3. Click on Permissions tab

4. Click the Edit link on the Public access settings card.


5. Uncheck both Block new public bucket policies and Block public and cross-account access if
bucket has public policies options and click on the Save button.

6. Type Confirm in Text box and then Click on Confirm Button


7. Click on Bucket Policy Button

8. Use the AWS Policy Generator via the link at the bottom, or paste the following public bucket
policy at the editor and click on the Save button.
9. Go back to your bucket's object listing by clicking on the Overview tab.
10. Test if your public bucket policy works.
a. Select any of your objects from within your bucket.

b. Click on the link for your object at the bottom of the page.
Basics of public vs private settings

 When S3 Bucket is Public


In this case, the Developer of the mobile app will configure bucket name and upload
images through that.

At time of displaying an image, there will be fixed type of URLs like


https://bucketname.s3-eu-west-1.amazonaws.com/folder-name/image-
name.extension
which will be called and an image will be displayed.

 When S3 bucket is Private


In this case upload scenario remains the same.

At time of displaying image, we need to prepare pre-signed URL from code which will
consist of some credentials and timestamp, based on that image can be displayed and
when timeout of 10 minutes is done, that URL will be of no use and can’t display image
so we have to re-generated new URL for the same image.

 When to use private and public?

If stored data contains sensitive information then only go with the private bucket,
otherwise, security measures can be taken care of in public buckets as well.

You might also like