본문 바로가기
[AWS]/Highly Available, Scalable, AWS Stack

18. Centralize images in S3

by SAMSUNG CLOUD-OKY 2022. 1. 19.
반응형

 

OK so in this video let us see how to create a bucket.

Right.

This is the S3 bucket and here we want to upload an image the image that we have in our application.

The AWS icon image.

And then we also need to make the image public so that we can access it because remember S3 has a security

layer.

Right.

And by default all content is private, the access is denied.

So we need do we need to make this public so that we can access the image.

Right.

And then once we do that we verify will verify that the image is accessible by using the URL

of the image because remember every object that you upload has a URL.

And we can use that URL to access the object.

Ok, this is what we want to do and later we'll see how to configure this.

URL in our application so that we can verify that the content is being is being delivered via S3

from an application.

OK so let's see how to do this.

So here's my AWS console.

And let's go to S3 and let's create a bucket.

OK let's create a bucket.

Let's call this bucket.

Something like this.

So

right.

And then I'll add my name just just to make the bucket named unique because remember the bucket name

has to be unique across all users of AWS.

Right.

So it's not just the name has to be unique within your account.

It has to be unique across all users.

And in that sense the bucket name is like a domain right.

It has to be unique and you may try something you may not.

It may say the bucket name is not available.

So you just have to change the name to something that has not yet been not yet been taken.

OK so let me create this bucket and then we'll upload upload our AWS.

Icon image.

Right.

So let's upload the icon and this is on my computer.

Let me just find this somewhere.

OK.

Here it is.

Let me just upload this AWS.

Icon.

And and then if you take a look at this this object right you'll see there's a URL.

But this URL we can we can try this URL to see if the images is visible it's available

or not.

Right.

And you will see that it says Access denied.

This is normal because it's free has a security layer and all content is denied until you explicitly

allow access to that particular object.

So there many ways of allowing access but the easiest way is to say this.

Easiest way is to make this object public and that changes the access control list for that object.

And and actually you want to see that you can go to permissions and you will see here under public access

everyone has read object.

This is the change that happened when we or when we said make public.

So now the object is public and let's verify.

So let me go back to this.

URL.

And let's make sure that we are able to view the AWS icon image on our browser.

OK.

So this is how you can create an S3 bucket you can upload an image you can make the image public

so that it is available.

Right.

It is available publicly using the URL of the object.

Right.

So basically we are trying to centralize our image storage right.

This way it is better.

We can have a fault tolerant architecture.

And now you've seen how to how to centralize the images.

So good luck with this task.

 

 

 

반응형

댓글