What changes are you making to your CloudFront Distribution resource in your template? Are you attaching WAF separately to CloudFormation? If you modify a property affecting WAF, CloudFormation may overwrite it; if you modify a property which requires replacement, CloudFormation will replace your Distribution with a new one.
I'd recommend you use CloudFormation to associate AWS WAF with your Distribution. You can provide it using the
WebACLId property of the
DistributionConfig property in your template. If you don't want to manage the whole WAF through CloudFormation, I'd recommend making a Parameter in your template to allow you to specify the WAF ACL Id, and then use that parameter when setting the value in the Distribution resource.
- asked 2 years ago
- asked a year ago
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated a year ago
- Why do my CloudFormation stack operations fail after I tag resources when I didn't change any IAM policies?AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 6 days ago
- EXPERTpublished 8 months ago
- EXPERTpublished 10 months ago