Creating an alias to a cloudfront distribution

0

Iʻve got an s3 bucket with static content. I have no concerns about who reads it. I was happy with putting things into an S3 bucket and serving up through http, but many web browsers now refuse to access the pages because they are http instead of https.

I created a CloudFront distribution for my s3 bucket. The distribution settings for "Viewer Protocol Policy" is set to "Redirect HTTP to HTTPS".

I requested and received an SSL/TLS certificate in the region I was directed to receive it in.

I then went to Route 53 to create an A record to connect to the CloudFront distribution. I for the "Value/Route traffic to" option, I chose:

"Alias to CloudFront distribution" as the record type.

But then there was no dropdown list of CloudFront distributions to choose from. What am I missing?

1 Answer
0
Accepted Answer

It sounds like you're on the right track with setting up your CloudFront distribution for your S3 bucket, but there are a few things to check to resolve the issue you're experiencing with Route 53.

First, ensure that you've added an alternate domain name (CNAME) to your CloudFront distribution that matches the domain name you're trying to use in Route 53. For example, if your Route 53 record name is "example.com", your CloudFront distribution must have "example.com" listed as one of its alternate domain names.

Next, verify that you're creating the Route 53 record in the correct region. CloudFront distributions are global resources, but they're only available for selection in Route 53 when you're in the US East (N. Virginia) region. You may see a message indicating that CloudFront distributions are only available in this region.

Also, make sure you're using the correct AWS account. The CloudFront distribution should be created in the same AWS account where you're setting up the Route 53 record.

If you've confirmed all of these points and still don't see your CloudFront distribution in the dropdown, try the following:

  1. Double-check that your CloudFront distribution is fully deployed and not in a "In Progress" state.
  2. Ensure you have the necessary permissions to view and select CloudFront distributions in Route 53.
  3. If possible, try creating the record using the AWS CLI or API to see if it's a console-specific issue.

Remember, when setting up the alias record in Route 53, you should choose "A - IPv4 address" as the record type, even though you're pointing to a CloudFront distribution. This is because CloudFront will handle the appropriate routing.

If you've verified all these steps and are still encountering issues, it may be worth contacting AWS support for further assistance.
Sources
Route53 - alias to cloudfront, distribution not listed | AWS re:Post
Speeding up your Amazon S3-based website using Amazon CloudFront - Hosting Static Websites on AWS

profile picture
answered 5 days ago
profile picture
EXPERT
reviewed 4 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions