Does basepath mapping on an API in API gateway use a 'hidden' cloudfront distribution?
I have an API on API Gateway, with base path mappings on a domain. However, this doesn't go through cloudfront--and thus no https, only http.
When I try to create a cloudfront distribution for the same domain, it says something to the effect that "CNAME already in use", and can't create the a cloudfront distribution for it, even though I don't have any cloudfront distributions associated with the domain, and nothing on route53 for it either.
If base path mappings on API Gateway creates a 'hidden' cloudfront distribution, one I can't see on the CloudFront distibution console page -- then this makes sense. I can only associate one distribution to one CNAME at a time.
But this makes base-path mappings in API Gateway pretty useless -- they don't allow me to distribute via cloudfront, and hence can't use https to protect a custom domain either. It seems a lot more straightforward to create an origin for cloudfront (one for API) and then assign it that way.
But wanted to confirm if indeed this was the case -- does base path mappings on an API in API Gateway create a 'hidden' cloudfront distribution and lock the CNAME domain from being used by another cloudfront distribution.