AnomalyInnovations / serverless-stack-demo-client

Source for the demo app client in the Serverless Stack Guide
https://demo2.serverless-stack.com
MIT License
635 stars 204 forks source link

[Question] post deploy script #7

Closed jatazoulja closed 6 years ago

jatazoulja commented 6 years ago

"postdeploy": "aws cloudfront create-invalidation --distribution-id E1KTCKT9SOAHBW --paths '/*' && aws cloudfront create-invalidation --distribution-id E3MQXGQ47VCJB0 --paths '/*'",

Why have 2 distribution ID?

jayair commented 6 years ago

@jatazoulja We are invalidating the cache for both the main CloudFront distribution and the www redirect one as well. I guess you could get by with just the main one if the www redirect never changes.

jatazoulja commented 6 years ago

Can you provide the settings for each CloudFront? and what's the difference of each?

TIA.

jayair commented 6 years ago

@jatazoulja These are all covered in the tutorial - http://serverless-stack.com. It's in the chapters where we deploy our React.js app.

jatazoulja commented 6 years ago

Thanks @jayair

will just leave this here in any case: http://serverless-stack.com/chapters/create-a-cloudfront-distribution.html

Cheers.