Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Low Priority] Investigate using CloudFront w/ custom domain #7

Closed
deeheber opened this issue Jul 21, 2023 · 2 comments · Fixed by #23
Closed

[Low Priority] Investigate using CloudFront w/ custom domain #7

deeheber opened this issue Jul 21, 2023 · 2 comments · Fixed by #23
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@deeheber
Copy link
Owner

Not necessary, but a nice to have bc we can use SSL certs to get rid of the insecure website errors that sometimes show up in certain browsers.

Ideally we'd set this up as an optional param passed as prop into the CDK app. If yes, deploy with CloudFront. If no, deploy as is with just the S3 bucket.

Some potential helpful resources (isitsnowinginhillsboro.com is not registered with Route 53 currently)
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.html

@deeheber deeheber self-assigned this Jul 21, 2023
@deeheber
Copy link
Owner Author

deeheber commented Feb 22, 2024

Plan of action thinking

Add the following resources to the existing weather stack:

  • hosted zone*
  • certificate*
  • bucket (done)
  • OAI
  • S3 origin
  • distribution
  • a record*

Allow for an optional env var to specify a custom domain name. If this is present, create the resources listed above with the * next to them. If env var is absent, don't create those resources or go with the CDK default.

Cloudfront certificates must be hosted in us-east-1. Could set this up using cross region references, but I think for now specifying in the README that this must be deployed in us-east-1 if you want a custom domain also makes sense to simplify a bit.

We'll also need to add a state to the Step Function to invalidate the Cloudfront cache on index.html after it is updated.

@deeheber deeheber added documentation Improvements or additions to documentation enhancement New feature or request in progress labels Feb 22, 2024
@deeheber
Copy link
Owner Author

deeheber commented Feb 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant