Michael Robellard
05/25/2022, 8:24 PMthis.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 errorthdxr
05/25/2022, 8:25 PMthdxr
05/25/2022, 8:25 PMMichael Robellard
05/25/2022, 8:28 PMMichael Robellard
05/25/2022, 8:28 PM