remix-aws-cdk-example icon indicating copy to clipboard operation
remix-aws-cdk-example copied to clipboard

Physical name for OriginRequestPolicy doesn't work for multiple deployed stacks

Open HerrBertling opened this issue 1 year ago • 0 comments

Hey 👋

First of all: Thanks for your awesome work with this repo. I've used it for the second time already and I'm really glad you provided such a nice boilerplate 😊 👍

I ran into an issue with this, though, and I figured I might raise this as a small issue since this has a simple fix from what I understood.

When setting up the cloudfront.OriginRequestPolicy, you're setting a static name for it here. This works well for a single Remix application deployed via this template. As soon as another one gets added in the same account, though, that stack cannot be deployed. Simple reason: There already is the named OriginRequestPolicy.

The simple fix for this would be to "just" remove that line from the stack. Naming is then automagically taken care of and won't break when adding more environments.

HerrBertling avatar Jul 20 '23 16:07 HerrBertling