I have an HTTP API that uses a custom domain as su...
# help
a
I have an HTTP API that uses a custom domain as such :-
Copy code
customDomain: {
    domainName: `${stageSubDomain}.${process.env.HOSTED_ZONE_NAME}`,
    hostedZone: hostedZone,
    path: process.env.API_VERSION, // this is 'v2'
  }
I’m now trying to create another HTTP API in the same stack with the custom domain path set to ‘v3’ for versioning sake but this fails and errors out with this message :-
Copy code
<http://abc.pqr.xyz|abc.pqr.xyz> already exists in stack arn:aws:cloudformation:region:xxx:stack/dev-api-v2-media-stack/xxxxxx
Is there a way to achieve path level versioning with route53 custom domains with HTTP APIs?
f
Ah yup 👍
d
how is that different from what you were doing…?
a
I had to refer the customdomain from the v2 api and pass it to the v3 api and also remove the hostedZone from the v3 api.
d
ah, need my coffee this morning
a
Haha, I’m on my 5th mug. 😂