2

I have CloudFront distribution with multiple domains. As example all domains like .mydomain.com caching in my distribution. And now I have problem with invalidation. I can't set invalidation path like this one.mydomain.com or http://one.mydomain.com. Every times when I need invalidate cache I must invalidate cache for everyone domais which I have. With the path /

But my site provide page editor, and I want invalidate page after each save in editor. How can I invalidate cache for individual domain?

ashedrin
  • 31
  • 1

1 Answers1

0

First of all, it is currently not possible to invalidate by domain and Cloudfront invalidation by path only.

If you plan to automate the invalidation once a page is saved, you can use the AWS SDK for CloudFront and call the createInvalidation method from your code.

Ashan
  • 18,898
  • 4
  • 47
  • 67
  • Hi Ashan. Tnx for response. I tried use sdk, but when set url to path list I got error about invalid invalidation path. – ashedrin Sep 20 '18 at 09:19