Description
This issue is a design proposal to add CloudFront integration into Copilot.
CloudFront is a content delivery network which allows users to deploy their applications globally, and securely. Introducing Copilot support for this eases development, and gives users more use cases for Copilot.
Problem Statement
Currently, Copilot has no internal integration with global content delivery. In order to setup these features, users have to work with AWS APIs or Consoles outside of Copilot. To continue the cycle of build, release, and operate, we want to deliver CloudFront support with Copilot for users who wish to introduce CloudFront into their applications without requiring them to spend time on creating the CloudFront infrastructure manually.
Proposal
Adding cdn:
field to environment manifests being introduced in #3522.
Users will configure CloudFront through a field in the environment manifest. All cases and customization will be handled in this field. Copilot will handle all the infrastructure work of setting up a CloudFront deployment for the user. The user will then be able to configure how the CloudFront distribution interacts with the rest of their application via subfields of the cdn
.
Initially we plan to create a default CloudFront distribution by specifying cdn
.
cdn: true
Then, for further customization, fields which cover http
and https support, as well as tls_termination
and http/https redirect
.
cdn
http:
path: "api" # This is part of the subdomain of the CloudFront/Route 53 domain name
redirect: true
cdn:
tls_termination: true
Then we also plan to support additional static
S3 bucket origins.
cdn:
static:
# Must be a bucket regional domain name
path: "static" # Default is *
location: cf-s3-ecs-demo-bucket.s3.us-west-2.amazonaws.com
Milestones
- First, CloudFront will be generated as a distribution in front the Application Load Balancers generated by a deployed LBWS.
- Second, we will allow users to hook previously created S3 buckets onto the CloudFront distribution.
- Lastly, we will allow the user to specify using TLS termination at CloudFront.
These features cover the initial design of CloudFront integration with Copilot, which has been requested before in #1313
We hope this feature will benefit you, and we're happy to receive any feedback you have!
Activity