In this tutorial, you'll learn how to host a static website using S3 and configure Route 53 to set an alias to the S3 website endpoint for a custom domain.
Amazon Route 53 – Use Route 53 to register domains and to define where you want to route internet traffic for your domain. The example shows how to create Route 53 alias records that route traffic for your subdomain to an Amazon S3 bucket that contains an HTML file.
Amazon S3 – You use Amazon S3 to create buckets, upload a sample website page, configure permissions so that everyone can see the content, and then configure the buckets for website hosting.
_
Video Transcript:
_
Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to host a static website using S3 with a customer Route 53 domain in AWS. Let's get into it. Let's start by navigating to the S3 service then click on create a bucket and give it a name.
The name of the bucket needs to be the exact same as the name of your custom domain. So I'm going to pick testing dot gokcedb.com. Let's leave the region to US East 1 and enable ACLS attention.
Uncheck, block all public access then acknowledge the warning that says this will make all objects in this bucket public. I'm going to leave all the other settings to their default values and then click on create a bucket. Let's go inside our bucket and upload the index.html file for our website. Keep your information in this file.
Well, I'm just printing hello world writing D1 tags. Let's continue uploading this file by hitting the upload button. Next, navigate to the properties tab then scroll down to the static hosting section.
Click edit, enable static website hosting, then specify the name of your index document. In our case this will be index.html that's why save then go back to the static website hosting section. This time you should see a bucket website endpoint.
Here click on it to see if you can access your website. Looks like we're getting the 403 Forbissen error to fix that go to the objects ab then clicks on the actions drop-down. Choose to make sure public using ACL then hit the make the public button.
Refresh your website endpoint and this time you should see your hello world message. Next, let's navigate to the Route 53 service then click on hosted zones. Go inside your hosted zone.
For me, gokcedb.com then click on create the record. Choose a simple route. Hit next then click on Define dimple record name. It needs to be the same as our S3 bucket. So in this case it should be testing Dot gokudb.com.
Leave the record. Type to a or Alisa and for the endpoint. Choose Alias 3 S3 website endpoint company for the region.
I'm going to select US East 1 and now if you click inside the S3 endpoint text box. Our S3 endpoint that we created earlier should automatically pop up. Select it then.
Click on Define simple record. Hit create records then click on view status. Your change status should now say pending.
Give it a few minutes and it should eventually change to in sync. Let's open a new browser session to confirm, that our custom domain is now routing to the correct S3 endpoint. There you have it.
If you have any questions, leave them in the comments section below. Don't forget to like, subscribe, and turn on your notification bell. Until next time.
Смотрите видео How To Host S3 Static Website With Custom Route 53 Domain (4 Min) | AWS | Set Alias To S3 Endpoint онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Gokce DB 31 Март 2023. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 1,131 раз и оно понравилось 25 посетителям.