apparently this is invalid: ``` const userPool = ...
# help
s
apparently this is invalid:
Copy code
const userPool = auth.node.defaultChild as cognito.CfnUserPool;
  
  userPool.lambdaConfig = {
    customEmailSender: {
      lambdaArn: props.cognitoEmailSender.functionArn,
    },
  };
I get this error:
TypeError: Cannot set property 'lambdaConfig' of undefined
. any ideas how I’d set this? TypeScript did give the OK here.. but apparently
defaultChild
doesn’t exist in this case
t
Can you show a bit more about where
auth.node
is coming from
s
auth
is an instance of
sst.Auth
ah, got it!
const userPool = auth.cognitoUserPool.node.defaultChild as cognito.CfnUserPool;
t
I think maybe you want to try this:
Copy code
auth.cognitoUserPool!.addTrigger
s
it’s not a trigger though, I don’t think. it doesn’t come up in autocomplete when you’re adding triggers in
new sst.Auth()
t
Ah I see