Removing cognito trigger event is failing

Hi

I have a function defined and its event is cognito PostConfirmation. All is working well but due to architecture change we no longer require the trigger. I still call the function from elsewhere so I simply commented out the events section of the function in the serverless.yml

I deployed the stack and the trigger is still present in the cognito pool

cognitoPostConfirmation:
handler: src/marlin/cognitoPostConfirmation.handle
description: Handles any post user signup functions
timeout: 60
# events:
# - cognitoUserPool:
# pool: {self:custom.{self:custom.stage}.cognitoPoolId}
# trigger: PostConfirmation

How would you remove the trigger if commenting out the trigger doesn’t ?

1 Like

7 days and no reply. Will open a bug in GitHub