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]

@alejandro As I mentioned, still not able to set up my own Gaia.

Did you get a chance to take a look at this? Please help us to finish our setup.

Folowed updated setup guide EC2 instance and S3 bucket launched successfully. Looks like I have similar issue with access to hub_info

“Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS request did not succeed). Status code: (null).”

Thank you and @ilayaperumal.raja for reporting these issues.

I checked the cloudformation.yaml file and the problem was on lines 199-200

        - IpProtocol: tcp
          FromPort: "22"
          ToPort: "22"
            Ref: SSHLocation

This was limiting the SSH access.

Please change it to:

        - IpProtocol: tcp
          FromPort: "22"
          ToPort: "22"

Please make this change and try again.

I am currently updating the cloudformation.yaml file and the docs with this information and the new S3 template link. It should all updated in the next couple of hours.

@alejandro, I just tried again with updated cloudformation.yaml. But CORS issue still persists. I captured the video for reference. Please take a look,

Raja I

Thanks for your the video @ilayaperumal.raja .

As you say yourself your GAIA hub is working fine and responds on the browser.

What`s the application that you are running on port 4200?

@alejandro It is a localhost application. We are trying to interact with our Gaia storage through stacks.js. Actually, stacks.js is trying to connect with our Gaia hub. But it fails with CROS error.

@alejandro Were you able to find the problem? Why can BlockStack gub_info be fetched and not for BlockSurvey hub_info?

@ilayaperumal.raja, I’ll send you a private message to see if we can schedule a call.