You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating a CDK Stack using the CloudFrontRedirector Construct which includes customPaths, I should be able to modify the contents to different paths, or new paths, and to have it take effect without any issue.
💥 Actual Behaviour
When custom paths are modified, it triggers an update of the resource. The KeyValueStore returns an error
x:xx:xx xM | UPDATE_FAILED | AWS::CloudFront::KeyValueStore | RedirectionForWebsiteRedirectMapA33E06EB
CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename [StackName][ResourceName]RedirectMap[UniqueID] and update the stack again.
This also triggers a full deletion and re-creation of the whole underlying construct, including the CloudFront Distribution, and any Route 53 records. They're all re-created, but this can take over 15 minutes for the deployment to complete.
The text was updated successfully, but these errors were encountered:
Issue is with how the underlying cloudfront.KeyValueStore works.
The contents of the KeyValueStore are derived from an S3 Object, and aren't stored in the resource itself. Since the underlying L2 construct doesn't support in-line declarations aws-cdk issue #29204, the adopted workaround for this construct creates a temporary file to be uploaded to S3 using the cloudfront.ImportSource.fromAsset method.
This might be solved by keeping the file in a static bucket location, which can be modified with the new contents, but it should probably be fixed in the CDK Construct itself. Will investigate further when time permits.
Implemented workaround patch (PR #3) for the issue by the construct automatically randomizing the name of the KeyValueStore each time. Solves the user experience issue, but leaves the problem that it updates the underlying CloudFront Distribution each time, taking extra time to deploy.
🤔 Expected Behaviour
After creating a CDK Stack using the CloudFrontRedirector Construct which includes customPaths, I should be able to modify the contents to different paths, or new paths, and to have it take effect without any issue.
💥 Actual Behaviour
When custom paths are modified, it triggers an update of the resource. The
KeyValueStore
returns an error🛠️ Steps to Reproduce
Error as described in Actual Behaviour should be present.
💡 Workaround (if known)
Renaming the resource is an effective, though inefficient way to bypass this bug.
This also triggers a full deletion and re-creation of the whole underlying construct, including the CloudFront Distribution, and any Route 53 records. They're all re-created, but this can take over 15 minutes for the deployment to complete.
The text was updated successfully, but these errors were encountered: