Hello, I don't know if this is already reported. R...
# sst
o
Hello, I don't know if this is already reported. Recently we created a deployment using ReactStaticSite. At first, we didn't notice that the Legacy clients support - $600/month option is checked by default. That was a bad surprise for us at the end of the month. I hope that this will help somebody in the future to check for this when deploying a Cloudfront app. And maybe is a good idea to put this in the documentation? Anyone have any idea on how to turn this off by default? Here is our code:
Copy code
import * as sst from "@serverless-stack/resources";

export default class MyStack extends sst.Stack {
  constructor(
    scope: <http://sst.App|sst.App>,
    id: string,
    props?: sst.StackProps,
    private readonly auth?: sst.Auth
  ) {
    super(scope, id, props);

    const site = new sst.ReactStaticSite(this, "MyDashboard", {
      path: "frontend",
      environment: {
        REACT_APP_AWS_REGION: scope.region,
        REACT_APP_IDENTITY_POOL_ID: this.auth?.cognitoIdentityPoolId,
        REACT_APP_USER_POOL_CLIENT_ID:
          this.auth?.cognitoUserPoolClient?.userPoolClientId,
        REACT_APP_USER_POOL_ID: this.auth?.cognitoUserPool?.userPoolId,
        REACT_APP_API_URL: process.env.REACT_APP_API_URL,
      },
      buildCommand: "npm run build",
    });

    // Show the endpoint in the output
    this.addOutputs({
      SiteUrl: site.url,
    });
  }
}
t
hm I'm looking for mention of this in cdk and I can't find anything
were you able to find this setting in the console?
I just found it for one of my static sites, it's off by default
is it possible someone on your team turned this on by accident? we have a lot of people using our static site construct so would be surprising if this is the first we've heard of it
o
No, nobody else touched it. It seemed strange to me also that it was on by default.
t
ah nice, yeah it looks like it defaults to SNI
just checked our code, we don't set that field
o
I will look into it thank you