Search code examples
amazon-web-servicesaws-api-gateway

Create API Mapping with Cloudformation and Api Gateway V1


I have created an AWS Api Gateway (edge optimized) with CloudFormation. So far, everything works great. Now I´d like to make that API available under a custom domain, so I also added a custom domain resource to my CFN scripts. However, I do not see any possibility to also create an API mapping with CFN. If I create that manually, everything works fine, but I want do have it as part of the CFN scripts. I´ve seen in the documentation, that there is an ApiMapping available for Api Gateway v2 resources, but as per my understanding this does not work with edge optimized APIs. Can you help me here?

Kind regards


Solution

  • The BasePathMapping indeed did the trick. That was not that obvious in my opinion, since the documentation nowhere states the purpose of that resource. Thank you.