Skip to content

Commit

Permalink
feat(cloudfront): new aws-cloudfront-origins module, support for ALB/…
Browse files Browse the repository at this point in the history
…NLB origins (#9209)

This change creates a new, dedicated aws-cloudfront-origins module to hold
convenience methods for constructing origins based on other constructs. The
initial set of supported origin types are S3 buckets, app and network load
balancers, and fallback support for any other HTTP server.

Future work in this space might include using properties of the constructs to
automatically configure the origins in optimal ways. For example, gaining access
to the load balancers' listeners to determine which port(s) CloudFront should
connect to.

Notes:
- It's worth someone challenging whether this is necessary. Most of the
  origin implementations are reasonably straightforward and could be
  included directly in the aws-cloudfront module.
- I wanted -- for non-S3 origins -- to expose the full set of configurable
  options, but didn't want to force users to specify the domain name, so split
  the *Origin Props into Options/Props, with the latter requiring the domain
  name. Open to other suggestions on how to achieve this (or arguments that the
  `S3Origin` should have this support as well).

fixes #9207


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
njlynch authored and Elad Ben-Israel committed Jan 18, 2022
1 parent 661364d commit c650d44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/decdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@aws-cdk/aws-cloud9": "0.0.0",
"@aws-cdk/aws-cloudformation": "0.0.0",
"@aws-cdk/aws-cloudfront": "0.0.0",
"@aws-cdk/aws-cloudfront-origins": "0.0.0",
"@aws-cdk/aws-cloudtrail": "0.0.0",
"@aws-cdk/aws-cloudwatch": "0.0.0",
"@aws-cdk/aws-cloudwatch-actions": "0.0.0",
Expand Down

0 comments on commit c650d44

Please sign in to comment.