The docs for APIGatewayV1 say "By default, a new API Gateway domain name is created. If you’d like to use an existing domain name, set the nameId to the ID of the domain name and do not pass in name.".
However, name is not marked as optional. If I ignore the warning and deploy anyway, it does not link my existing API Gateway domain name to the Gateway.
APIGatewayV2 does work correctly when passing name. Only APIGatewayV1 does not work.
// Gateway V2, works
const api = new sst.aws.ApiGatewayV2("test-api", {
domain: {
nameId: "my-example-company.com"
},
});
// Gateway V1, does NOT work
const api = new sst.aws.ApiGatewayV1("test-api", {
domain: {
nameId: "my-example-company.com"
},
});
The docs for APIGatewayV1 say "By default, a new API Gateway domain name is created. If you’d like to use an existing domain name, set the nameId to the ID of the domain name and do not pass in name.".
However,
name
is not marked as optional. If I ignore the warning and deploy anyway, it does not link my existing API Gateway domain name to the Gateway.APIGatewayV2
does work correctly when passingname
. OnlyAPIGatewayV1
does not work.