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

Implement CloudFront CDN for Static Site #680

Closed
2 tasks
acouch opened this issue Nov 7, 2023 · 2 comments · Fixed by #3239
Closed
2 tasks

Implement CloudFront CDN for Static Site #680

acouch opened this issue Nov 7, 2023 · 2 comments · Fixed by #3239
Assignees
Labels
refinement topic: infra Infrastructure related tickets

Comments

@acouch
Copy link
Collaborator

acouch commented Nov 7, 2023

Summary

We are moving forward with CloudFront as a CDN tool. This work is set up CloudFront for the static site.

Acceptance criteria

  • CloudFront CDN added to static site
  • Update team documentation
@acouch acouch added the project: grants.gov Grants.gov Modernization tickets label Nov 7, 2023
@acouch acouch added this to the Static Site - Public Launch milestone Nov 7, 2023
@sumiat sumiat moved this from Icebox to Refinement in Simpler.Grants.gov Product Backlog Nov 13, 2023
@acouch acouch moved this from Refinement to Blocked in Simpler.Grants.gov Product Backlog Nov 20, 2023
@sumiat sumiat changed the title [Task]: Implement CDN for Static Site [Task]: Implement CloudFront CDN for Static Site Nov 21, 2023
@sumiat sumiat moved this from Blocked to Sprint Ready in Simpler.Grants.gov Product Backlog Nov 21, 2023
@lorenyu
Copy link

lorenyu commented Nov 22, 2023

@acouch this is on the backlog for the infra template too. have you thought about the technical design for this? i was thinking that we could do something like:

  • add a new terraform module infra/modules/cdn
  • call the new cdn module from the infra/frontend/service module

the infra template version would look similar but would be more customizable:

  • add a has_cdn to app-config
  • add a new terraform module infra/modules/cdn
  • call the new cdn module from the infra/frontend/service module if app_config.has_cdn is true

thoughts?

@sumiat sumiat modified the milestones: Static site public launch - post-launch activities, Technical improvements Dec 18, 2023
@sumiat sumiat moved this from Sprint Ready to Icebox in Simpler.Grants.gov Product Backlog Feb 7, 2024
@acouch acouch removed the refinement label Mar 26, 2024
@coilysiren coilysiren self-assigned this Sep 26, 2024
@mxk0 mxk0 added topic: backend Backend development tickets refinement infra topic: infra Infrastructure related tickets and removed infra topic: backend Backend development tickets project: grants.gov Grants.gov Modernization tickets labels Oct 6, 2024
@margaretspring margaretspring removed this from the Technical improvements - Cross-Deliverables milestone Oct 22, 2024
@mxk0 mxk0 moved this from Icebox to Todo in Simpler.Grants.gov Product Backlog Nov 11, 2024
@coilysiren coilysiren moved this from Todo to In Progress in Simpler.Grants.gov Product Backlog Dec 3, 2024
coilysiren added a commit that referenced this issue Dec 6, 2024
## Summary

Relates to #680

### Time to review: __20 mins__

## Changes proposed

- Adds a Cloudfront CDN
- The CDN caches everything at 1 hour by default
- It is only active in staging and prod
- It logs to a newly created S3 bucket _(with a whole lot of
permissions)_
- It forward to the frontend ALB
- It only caches GET, HEAD, OPTIONS

## Testing

https://d3oegia17k54zs.cloudfront.net/

<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/401f64f1-ad0f-430d-8077-55088f52d08c">

You can have the load balancer available at the same time as the CDN:
http://frontend-staging-1506108424.us-east-1.elb.amazonaws.com/. That
said, after we roll this to production and test it, we should block
public access to the load balancer, and swap the simpler.grants.gov
CNAME over to the CDN.

<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/81887c4d-6664-4ff6-8ce5-357995c76db7">
@mxk0 mxk0 changed the title [Task]: Implement CloudFront CDN for Static Site Implement CloudFront CDN for Static Site Dec 10, 2024
@mxk0
Copy link
Collaborator

mxk0 commented Dec 10, 2024

To be broken down into implementation tickets during 12/11 refinement.

coilysiren added a commit that referenced this issue Dec 16, 2024
## Summary

Fixes #680

### Time to review: __5 mins__

## Changes proposed

- Uncomments the CDN
- Adds a TLS policy
- Fixes adding the cert to the CDN when applicable

## Testing

I deployed this to both dev (without the cert) and staging (with the
cert) to test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refinement topic: infra Infrastructure related tickets
Projects
Development

Successfully merging a pull request may close this issue.

7 participants