sst / sst

Build full-stack apps on your own infrastructure.
https://sst.dev
MIT License
24.04k stars 1.85k forks source link

Cannot use existing API Gateway domain name in APIGatewayV1 #5889

Open sbrown94 opened 4 weeks ago

sbrown94 commented 4 weeks ago

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"
    },
  });
jayair commented 3 weeks ago

I'll take a look.