Check out bidbear.io Amazon Advertising for Humans. Now publicly available 🚀

AWS API Gateway Stages

Contents

Understanding Stages

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.

Troubleshooting Stages

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 api.yoursite.com/dev.

What you have to do is make sure that the default endpoint setting is enabled in Settings > Default Endpoint

enable default endpoint settings menu

and then direct your requests to the default endpoint url for the endpoint EX: https://abc123.execute-api.us-east-1.amazonaws.com/dev.

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…).

Amazon Ad Analytics For Humans

Advertising reports automatically saved and displayed beautifully for powerful insights.

bidbear.io
portfolios page sunburst chart