Atihska
Atihska

Reputation: 5126

AWS: How to create Base Path Mappings for custom domain

I am following this tutorial to create a custom domain for my API Gateway method, linked to lambda function. [http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-mapping-basePath-examples]

After the custom domain is mapped to cloud front distribution domain name, the last step is to to set the base path for API mappings. I am assuming this is the step where the cloud front distribution url will be linked to api gateway endpoint created for which this custom domain has been created.

But how and where do you create base path for API mappings on console? i couldn't find any button or UI element to do it.

Please help!

Upvotes: 3

Views: 16711

Answers (2)

MikeD at AWS
MikeD at AWS

Reputation: 3745

Base path mappings can be created via the API Gateway console. Select "Custom Domain Names" from the list of navigation links on the far left (it's the third from the bottom). Select the custom domain name that you already added from the list. Add one or more base path mappings.

Upvotes: 7

Stafford
Stafford

Reputation: 51

  • Go to the AWS API Gateway console
  • Click APIs on top left to create a new API
  • Name the API
  • Left menu: click on the API you just named.
  • Click on the "Resourses" sub menu.
  • Click the pulldown menu on the Actions button.
  • Click "Create Resource"; do this for each sub-directory you want to create; example: api/ then mycoolapi/ so you get a base path of /api/mycoolapi/
  • Then when you are at the level where you want to call your lambda function choose the "Create Method" selection from the Actions button dropdown menu. Choose POST or GET or whatever type of call you want to make.
  • Select "Integration type" Lambda Function.
  • Select "Lambda Region" - this is the region you created your lambda function in
  • Select "Lambda Function" - put in the name of your function.
  • At this point you'll see an interface to test your setup and see if everything works.

I hope I'm understanding your question. Good Luck!

Upvotes: 5

Related Questions