Configure backend with Amazon CloudFront

4.1. Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/.

4.2. Choose your CloudFront distribution.

CloudFront Dist

4.3. Go to Origins tab and click on Create Origin.

CloudFront Origin

4.4. For Origin domain select your Application Load Balancer and choose Create.

CloudFront Create Origin

4.5. Go to Behaviors tab and click on Create Behavior.

CloudFront Behaviors

4.6. For Create Behavior complete as follows and choose Create behavior:

  • Path Pattern: /api*
  • Origin or Origin Group: ELB-CdkMs-ALBAE--XXXXX
  • Allowed HTTP Methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
  • Cache Policy: CachingDisabled
  • Origin Request Policy: AllViewer

CloudFront Behaviors

This may take a few minutes to apply changes.