Getting images to S3 using AWS

Jorge Santos
2 min readJun 7, 2020

--

Amazon S3 logo

So, you want to host your photos on S3 using AWS, well let's get started!

First things first, make an AWS account, doing so will require you to add a credit card to your account just in case.

Second, using the “find services” search bar, search for “S3”.

Using the “find services” search bar and searching for S3

Third, create a new bucket and name it. This name must be unique and cannot currently exist in order to create the bucket.

Fourth, configure permissions however you wish or select “next” for default options.

Creating a new bucket

Select the bucket and upload images as you wish.

To make this photo public so you can use it in your code, you need to change the permissions.

In the bucket, there is an option for “permissions.” Select this option and edit to “Block public access.” Once you have unselected the option “Block all public access,” save your changes.

Unselected the option “Block all public access”

In addition, to use the image in your code you must make the image public by selecting “make public,” located in the image’s overview.

Selecting “make public”

Finally, to use the image, copy the object’s URL in the overview of the image you would like to use.

Copying the object’s URL

To use this hosted photo, you must place the URL in an “img” if using HTML.

For example:

<img src="https://mediumtest12.s3.us-east-2.amazonaws.com/charles-pug.jpg" alt="Charles">

Congrats you now have a hosted image on AWS using S3!

Hosted image on AWS using S3

--

--