aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

CDK deployment for CloudFront with L@E and CFF serving static and dynamic content

Open terrificdm opened this issue 3 years ago • 1 comments

:rocket: Feature Request

General Information

  • [X] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

Description

I'd like to add an example for using CDK to deploy CloudFront with Lambda@Edge and CloudFront Functions for a Flask website which consists of static content as well as dynamic content. And there are 3 scenarios covered from codes: Example 1) No L@E and CFF, just an ordinary CF distribution working with the Flask website; Example 2) A L@E function is associated with CF; Example 3) Both the CFF and the L@E function are associated with CF.

Proposed Solution

The codes are ready in this repo

Environment

  • CDK CLI Version: 1.119.0
  • Example: CloudFront with L@E and CFF serving static and dynamic content
  • Example Version:
  • OS:
  • Language: Typescript(There is a bug in Python for L@E, once it is fixed, I can try to write a Python example as well)

Other information

terrificdm avatar Aug 25 '21 08:08 terrificdm