Siddharth Ram
Siddharth Ram

Reputation: 576

rewriterules for AWS lambda and AWS API gateway

Deployment of a lambda function requires specification of a stage (e.g. beta). So if you are hosted at 123.us-west-1.amazon.aws, your deployed api on the API gateway will be at 123.us-west-1.amazon.aws/beta.

How do I reroute calls going to 123.us-west-1.amazon.aws/ to 123.us-west-1.amazon.aws/beta ?

I tried setting up an S3 bucket to redirect to a different host, but that does not work. neither does setting up a KeyPrefixEquals in S3.

Upvotes: 0

Views: 208

Answers (1)

jackko
jackko

Reputation: 7344

The stage is required, you cannot set anything up on the root path of the default domain name. If you use a custom domain name, like api.yourdomain.com, and configure that in API Gateway, you can set up a base path mapping from the root resource to the Stage of an API.

http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html

Upvotes: 1

Related Questions