Stacks Forum

CORS issue - Accessing my own gaia with aws cloud

Hi, We have set up our own gaia storage in the AWS cloud as per the document.

It is running successfully. Also, I am able to get hub_info from the browser (

Problem is, When I am trying to get hub_info through the program, it gives CORS error. Attaching the screenshot for reference.


Followed this document to setup gaia,

Can you help me with this, if you have a quick answer or had a similar problem?

@jwiley @jude

@alejandro !
@ilayaperumal.raja alejandro works with us here at the foundation, he’s been digging into gaia and he’ll reachout to see what’s going on here.

1 Like

@jwiley, Thanks for your quick reply. @alejandro Please let me know if any configuration/setup needs to be changed for the CORS issue. Thanks in advance.

@ilayaperumal.raja it seems you followed and older version of the tutorial. Let me double check the steps, try it out myself and I’ll get back to you.

1 Like

@alejandro Hope you would have understood the problem in my gaia setup. Can you please help me with a new version of the tutorial?

There isn’t one yet. :slight_smile:

If you look at the current docs: there is no tutorial for this anymore. You are looking at older version of the site, and in the current site, the article you mention was removed. Not sure why someone removed it…

I want to follow the steps of the tutorial myself, verify it’s still valid and change anything that needs to get updated. I’ll let you know as soon as I finished it.

Ok, I finished the tutorial and now we have it again.

The old tutorial needed some changes (maybe that’s why it was removed), so I re-wrote it and modified the CloudFormation template to make it work again.
The new tutorial with the link to the new template is published here.

This however probably doesn’t fix your problem as you already had your hub setup.

I would recommend you look at two things that could fix the problem:

  1. The S3 policy is incorrect or wasn’t created.
  2. Check what method you are using, and verify it is compatible. If you look at this gaia template file on lines 77 and 85 you will see:
add_header Access-Control-Allow-Methods "POST, OPTIONS";


add_header Access-Control-Allow-Methods "POST, OPTIONS";

so if you for example use a GET method it won’t get accepted.

Thanks for the tutorial. I followed the steps and created CloudFormation. EC2 instance and S3 bucket were launched successfully. But the server is not reachable by public DNS(

Note, previous gaia setup is reachable by public DNS(

I am passing the new gaia hub URL ( to stacks.js. Stacks is making a GET call to get hub_info.

I can show the demo of my gaia setup and configuration with stack.js. Feel free to email me [email protected]