Stages allow you to create multiple versions of the API so that you can experiment with changes to your endpoints, or use different lambda functions depending on your API stage. You can accomplish this using environment variables that can be changed for each stage, much like environment variables in node.
If you are receiving a CORS or “403 Forbidden” error while trying ping a secondary stage of your api like “dev” or “staging” (whatever you have called it) you might be running into a similar issue to what I had.
It turns out that stages cannot be accessed using a custom domain. For example if you have setup your API to use a custom domain like
api.yoursite.com, and then you create a
dev stage to that api, you will not be able to access it at
What you have to do is make sure that the default endpoint setting is enabled in Settings > Default Endpoint
and then direct your requests to the default endpoint url for the endpoint EX:
This seems to contradict what a lot of the online documentation says, but this solved the issue for me. I could not get stages to function on a custom domain.
Note that after you have updated this setting, it won’t take affect until you have deployed one of the stages (even though this is a global setting for all stages…).