Forbes magazine logo Ranked Best Coding Bootcamps 2023

Amazon AWS S3 Error: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Altcademy Team wrote on 7 February 2018

I am trying to upload files from my browser app to s3 but I get the following error when uploading:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Need to configure your CORS Settings for your bucket on amazon s3 console.
To edit your S3 bucket permissions:
  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
  2. In the Buckets list, open the bucket whose properties you want to view and click "add CORS configuration"
  3. Write the rules you are willing to add in between the tags <CORSConfiguration>

<CORSConfiguration> <CORSRule> <AllowedOrigin>http://www.yourdomain.com</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>


Trusted by

Students and instructors from world-class organizations

Imperial College London
Carnegie Mellon University
City University of Hong Kong
Hack Reactor
Cisco Meraki
University of Oxford
Swift
Bazaarvoice
Waterloo
Uber
AtlanTech
Tumblr
Boston College
Bombardier Aerospace
University of St. Andrews
New York University
Minerva Schools at KGI
Merrill Lynch
Riot Games
JP Morgan
Morgan Stanley
Advanced Placement®
Google
KPMG
The University of Hong Kong
University of Toronto
SCMP
Moat
Zynga
Hello Toby
Deloitte
Goldman Sachs
Yahoo
HSBC
General Assembly
Tesla
McGill University
Microsoft

Join the upcoming Cohort #97

Enroll for January 6th, 2025