I have a Cloud Front distribution that servers files from '/pub/static' folder of Magento.
This distribution has that configurations above:
But some files are broken because it's not on cloud front.
What I'm doing wrong?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Origin path in Origin Settings
leave it empty (this is reason why you get error)
Default/root/object in Distribution Settings set to your path pub/static (or static)
Allowed http methods set to GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
After this changes , wait a little. You should load static files now or see 502 error (this mean you are on good road)
I just found this, really helped me: