```this.api = new sst.Api(this, "Api", { customD...
# help
m
Copy code
this.api = new sst.Api(this, "Api", {
  customDomain: {
      hostedZone: "<http://chartflow.io|chartflow.io>",
      domainName: apiurl,
      cdk: {
          certificate: this.cert
      }
  },
  cors:{
    allowOrigins: [`https://${weburl}${scope.local ? ":3000" : ""}`],
    allowMethods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
    allowHeaders: ["Access-Control-Allow-Headers", "Origin", "Accept", "X-Requested-With", "Content-Type",
        "Access-Control-Request-Method", "Access-Control-Request-Headers"],
    allowCredentials: true
  },
  defaultFunctionProps: {
      environment: {
          SEARCH_ENDPOINT: props.opensearch_domain.domainEndpoint,
          STAGE: scope.stage,
          UPLOAD_BUCKET: props.s3_bucket.bucketName,
      },
      permissions: [
            new iam.PolicyStatement({
                actions: ["ssm:GetParameter", "ssm:GetParameters", "ssm:GetParametersByPath"],
                resources: ["*"],
            }),
      ],
      srcPath: "backend/"
  },
  routes: {
    //user
    "POST /login_check": "services/api/user/login_check.handler",
    ...
This is the original defaultFunctionProps, which worked fine in 0.6.9, I also tried changing it to default and I get the same error
are you setting it like this?
m
I was missing the function: { between the defaults and the actual key/values... Thanks
Funny thing is I had that right in another place