Amazon’s Simple Storage Service (S3) can be used to host static websites (check out this video for more: https://youtu.be/H83xYoC3z4A). But as you’re building your website, you might come across problems with Cross-Origin Resource Sharing, or CORS. CORS defines how you share resources across domains.
In this video, I explain CORS with a real-world analogy for how we communicate with other people, then review what makes up a “domain.” From there, I walk through an S3-specific example, showing how an HTML page in one S3 bucket can interview with an HTML page in a second bucket.
If you want to check out hands-on demo for how to implement this in S3, check out this video: https://youtu.be/Dj1FMe_uQLc.
??If you’re interested in getting AWS certifications, check out these full courses. They include lots of hands-on demos, quizzes and full practice exams. Use FRIENDS10 for a 10% discount!
– AWS Certified Cloud Practitioner: https://academy.zerotomastery.io/a/aff_n20ghyn4/external?affcode=441520_lm7gzk-d
– AWS Certified Solutions Architect Associate: https://academy.zerotomastery.io/a/aff_464yrtnn/external?affcode=441520_lm7gzk-d
00:00 – What is cross-origin resource sharing or CORS?
00:38 – A simple analogy of CORS in the real world
01:01 – Understanding the different parts of a domain
01:27 – What does it mean to be cross-origin?
02:13 – CORS is enforced by the browser (not AWS)
02:38 – Walking through an example of CORS with Amazon S3 buckets