Jett Robin Andres
11/20/2021, 1:06 PMenvironment
variables to my preTokenGeneration
and postAuthentication
handlers? I’m forced to use the old(?) handler interfaceAdrian Schweizer
11/20/2021, 3:55 PMAdrian Schweizer
11/20/2021, 3:57 PMAdrian Schweizer
11/20/2021, 3:59 PMAdrian Schweizer
11/20/2021, 4:03 PMAdrian Schweizer
11/20/2021, 4:05 PMthis.api = new sst.Api(this, "Api", {
defaultFunctionProps: {
environment: {
MY_VAR: "WHATEVER",
},
Mike McCall
11/20/2021, 5:30 PMpreAuthentication: {
handler: "src/preAuthentication.main",
timeout: 10,
environment: { bucketName: bucket.bucketName },
permissions: [bucket],
},
https://docs.serverless-stack.com/constructs/Auth#using-the-full-config-for-a-triggerFrank
Frank
this.auth = new sst.Auth(this, "Auth", {
cognito: {
userPool: ...,
defaultFunctionProps: {
environment: {
ENV_VAR_A: ...,
ENV_VAR_B: ...,
},
},
triggers: ...,
},
});
Jett Robin Andres
11/21/2021, 1:48 AMJett Robin Andres
11/21/2021, 1:49 AM