jmattgiroux / aws-tutorials

MIT License
0 stars 0 forks source link

Getting started with a secure static website #6

Open jmattgiroux opened 1 year ago

jmattgiroux commented 1 year ago

Tutorial here

jmattgiroux commented 1 year ago

Got domain name through Route 53, currently pending: jared-secure-static-website-tutorial.link

jmattgiroux commented 1 year ago

Added permissions to my IAM user account (AWSCloudFormationFullAccess)

jmattgiroux commented 1 year ago

Started the stack creation process (view progress here)

View Domain Registration Progress here

jmattgiroux commented 1 year ago

Domain is now registered (faster than expected): image

jmattgiroux commented 1 year ago

The first stack I tried to create encountered an issue due to certificate stuff. This time the domain is already finished registering, and I've specified the Hosted Zone ID (which wasn't mentioned in the instructions, but shouldn't cause issues) and so hopefully it will work this time.

jmattgiroux commented 1 year ago

While the stack is loading, I'll read about Amazon CloudFront

jmattgiroux commented 1 year ago

Success: image image

jmattgiroux commented 1 year ago

Changed Text in index.html to test making changes to a website. I then had the stack update image However, the content showing up is still the same as before; it's probably cached in the edge location.

It should update within 24 hours, or after the stack updates again. I had the stack detect drift, which seemed to have triggered another update to the stack image

jmattgiroux commented 1 year ago

Nevermind, the drift detection didn't get any results (maybe certain items need to be flagged for drift protection to check on them) and the update didn't result in the displayed website changing. I'll check tomorrow.

jmattgiroux commented 1 year ago

It did finally work: image

jmattgiroux commented 1 year ago

Someone else encountered the rollback issue when creating their stack for cloud-formation. I confirmed that their domain on Route53 was finished setting up, and advised them to try creating a new stack with the HostZoneID filled out when creating it.

jmattgiroux commented 1 year ago

Here's the issue we're trying to figure out:

Earlier: image

Later:

Screenshot 2023-02-28 at 2 53 53 PM
jmattgiroux commented 1 year ago

Is the issue whether Route53's domain name is global or a public hosted zone?

We're basically trying to find the difference between my set up and my colleague's set up.

Compare the templates for the cloudFormation too 🤷‍♂️

jmattgiroux commented 1 year ago

Can you change a Route53 domain to be a private hosted zone? If so, where? No, it seems like you can just create a new hosted zone that has that change

jmattgiroux commented 1 year ago

Possible issue was my colleague's route53 Domain had an "A" type record set to an s3..... domain, while mine was some ...cloudfront... domain.

We deleted their public host zone, and created a new one with their domain name, which just had the two SOA and NS records. Hopefully the A type record will automatically by added by Amazon during the CloudFormation stack creation process. We also started the cloudFormation stack creation process, using the new host zone id.

My Public Host Zone: image