Amazon S3

Amazon S3

ยท

2 min read

In this lab we are going to create a bucket on Amazon s3 , upload object and expose it to public

Step 1:- Go to your AWS dashboard and search S3, Click on it.

chrome_WIVXVH3ccz.png

Step 2:- Click on create Bucket.

image.png

Step 3:- Give a unique Name for your Bucket and choose your region, Finally click on create Bucket.

image.png

image.png

Step 4:- Your Bucket will be created, Now go inside your bucket.

image.png

Step 5:- Click on upload.

image.png

Step 6:- Click on Add files to Upload any image you wish.

image.png

image.png

Step 7:- Click on Upload.

image.png

Step 8:- Your object will be uploaded and Click on Your bucket.

image.png

Step 9:- Copy object URL and paste it on your browser.

image.png

You can't access the bucket and object because it's not public.

image.png

Let's provide public access to our bucket.

Step 10:- Click on permission.

image.png

Step 11:- As you can see our bucket is not public, Now click on Edit.

image.png

Step 12:- Disable Block all public access.

image.png

image.png

As you can see our bucket is public, Let's make our object public.

image.png

Step 13:- In Bucket Policy, Click on Edit.

image.png

Step 14:- Click on policy generator.

image.png

Step 15:- Choose S3 Bucket Policy.

image.png

Step 16:- Effect "ALLOW" , Principal "*" , Actions "GetObject" .

image.png

Copy your ARN.

image.png Paste your ARN in Amazon Resource Name (ARN) arn:aws:s3:::myglobabucket/*

Make sure you add /* at the end of your ARN which means to access all your object inside your bucket, Finally click on Add statement.

image.png

Click on generate policy.

image.png

Copy your Policy.

image.png

Paste your Policy.

image.png image.png

As you can see our Bucket and object is public now, Let's confirm it.

image.png

Select your object and copy your object URL and paste it in browser.

image.png

Finally we exposed our object publicly available.

image.png

That's it, for now, we will continue further more in next blog.

Hope you liked it. Will see you on the next topic ๐Ÿ˜ƒ

ย