aws-samples / aws-last-mile-delivery-hyperlocal

AWS Last Mile Delivery Hyperlocal
Other
42 stars 11 forks source link

fix: CF WebACL in its own stack #159

Closed sperka closed 1 year ago

sperka commented 1 year ago

Issue #, if available:

Description of changes:

In the current state we created a WebACL with CLOUDFRONT scope with a custom resource. The custom resource started to get an empty result payload and deployment failed.

This PR has the following changes:

  1. Create a standalone stack that creates the WebACL with CLOUDFRONT scope in the us-east-1 region AND saves the ARN into the working region (e.g.: ap-southeast-1) via a custom resource into Parameter Store
  2. Setup a dependency between the newly created stack and the simulator's persistent backend stack
  3. SimulatorPersistentBackendStack will pick up the SSM Parameter from its own region and associates it to the CF distribution

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.