Andreas
02/22/2021, 11:49 PMFrank
sst.Api
construct uses HTTP API behind the scene. Try this:
• create an ACM Certificate with DNS validation - https://docs.aws.amazon.com/cdk/api/latest/docs/aws-certificatemanager-readme.html#dns-validation
• create an API Gateway DomainName - https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-readme.html#custom-domainFrank
sst.Api
will have built-in support for custom domain laterAndreas
02/23/2021, 12:26 AMAndreas
02/23/2021, 12:26 AM_const_ httpApi = new apig.HttpApi(this, 'HttpApi', {
defaultDomainMapping: ...
})
Andreas
02/23/2021, 12:27 AMconst api = new sst.Api(this, 'Api', {
httpApi: httpApi,
Frank
sst.Api
construct
const api = new sst.Api(this, ...)
Frank
api.httpApi
gives you the created HttpApiFrank
apig.HttpApi
yourselfFrank
Andreas
02/23/2021, 12:42 AMFrank
defaultDomainMapping
has to be passed in on create. So I was wrong. You can’t set the domain on top the HttpApi created by sst.Api
Frank
Frank
sst.Api
sometime this week.Andreas
02/23/2021, 3:43 AMFrank
$ npm install --save --save-exact @serverless-stack/cli@0.9.7 @serverless-stack/resources@0.9.7