Sam Hulick
12/28/2021, 8:01 PMSam Hulick
12/28/2021, 8:06 PMDomainName
construct supports mapping
, but `@aws-cdk/aws-apigatewayv2`’s DomainName
does not. weird. is it ok to use the first one on an HTTP API?Frank
Sam Hulick
12/28/2021, 8:07 PMthis.restApi = new sst.Api(this, 'RestApi', {
...
customDomain: { ... }
})
this supports only one custom domainSam Hulick
12/28/2021, 8:07 PMFrank
Sam Hulick
12/28/2021, 8:09 PMSam Hulick
12/28/2021, 8:16 PMSam Hulick
12/28/2021, 8:20 PMSam Hulick
12/28/2021, 8:25 PMApiMapping
I think. but I don’t know how to pass in the right object to the api
property. it needs an IApi
type. I really don’t understand CDK’s conventionsSam Hulick
12/28/2021, 8:25 PMIApi
from an HttpApi
?Frank
Sam Hulick
12/28/2021, 8:29 PMSam Hulick
12/28/2021, 8:30 PMFrank
Frank
*.<http://reelcrafter.com|reelcrafter.com>
Sam Hulick
12/28/2021, 8:31 PMSam Hulick
12/28/2021, 8:31 PMconst domain = new apigwv2.DomainName(this, 'Api2Domain', {
domainName: '<http://api2.reelcrafter.com|api2.reelcrafter.com>',
certificate: acmCert,
});
new apigwv2.ApiMapping(this, 'Api2Mapping', {
api: this.restApi.httpApi,
domainName: domain,
});
Sam Hulick
12/28/2021, 8:38 PMSam Hulick
12/28/2021, 9:00 PMSam Hulick
12/28/2021, 9:00 PMSam Hulick
12/28/2021, 9:01 PMsst.Api
allowed for an array of custom domains, that certainly would be an awesome shortcut.Frank
Api
does behind the scene as well.Sam Hulick
12/28/2021, 9:08 PM<http://regional-api.reelcrafter.com|regional-api.reelcrafter.com>
, and then the <http://api.reelcrafter.com|api.reelcrafter.com>
“A” record will point to a CloudFront distribution that has <http://regional-api.reelcrafter.com|regional-api.reelcrafter.com>
as an origin. and the API Gateway custom domain is needed so the Host header is what <http://regional-api.reelcrafter.com|regional-api.reelcrafter.com>
expectsSam Hulick
12/28/2021, 9:09 PMSam Hulick
12/28/2021, 10:03 PM