I ran into something recently that didn’t make sense at first.
My React app was working fine on Vercel. The page loaded, everything looked clean, no errors. Then I decided to improve it a bit ,instead of hardcoding my “About the Founder” section, I moved the data into a JSON file hosted on Amazon S3.It felt like a simple upgrade.That’s when everything stopped working.
The request itself looked successful. No network failure, no broken endpoint. But the UI just refused to show the data. It was like nothing had happened. So I opened DevTools… and that’s when I saw it:
“No ‘Access-Control-Allow-Origin’ header is present…”
That was the moment it clicked, this wasn’t my React code failing. The browser itself was blocking the response. My frontend was running on:
https://emerge-textiles.vercel.app
And my data was sitting in Amazon S3, which is of a completely different origin. From the browser’s point of view, that’s a cross-origin request, and by default, it doesn’t allow it unless the server explicitly says it’s okay. Even though the request returned 200 OK, the browser still refused to give my app the response. That part really changed how I understood things. To make sense of it, I stepped back and looked at the flow more clearly.
The browser sends a request with an Origin header. S3 responds. But the browser is the one that decides whether that response should be accessible or not. That’s the key idea I was missing before, CORS is enforced by the browser, not AWS. At that point, I could have gone into the AWS Console and fixed it manually. But I wanted to approach it properly, so I used Terraform to configure the CORS policy on the bucket.
All I needed to do was allow my frontend’s origin to access the resource. Once that was in place, the browser had no reason to block the response anymore. After applying the change, I refreshed my app…and it still didn’t work. For a second, I thought I had done something wrong. Then I remembered something simple, the browser had cached the previous response. After a hard refresh, everything loaded instantly.
That moment felt different. Not just because it worked, but because I finally understood why it worked. What looked like a small issue ended up teaching me something important. A request can succeed and still fail in your app. Infrastructure decisions affect frontend behavior more than we sometimes realize. And debugging forces you to understand systems in a way tutorials don’t.
As I continue building and sharing as an AWS Community Builder, I’m learning to pay more attention to these moments. They’re frustrating at first, but they’re also where the real understanding comes from.




Top comments (0)