404 error while adding lambda trigger in cognito user pool
Asked Answered
A

1

6

I have created a SAM template with a function in it. After deploying SAM the lambda function gets added and are also displayed while adding lambda function trigger in cognito but when I save it gives a 404 error.

SAM template

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >-
  description

Globals:
  Function:
    CodeUri: .
    Runtime: nodejs14.x

Resources:
  function1:
    Type: 'AWS::Serverless::Function'
    Properties:
      FunctionName: function1
      Handler: dist/handlers/fun1.handler

error in cognito while adding trigger

[404 Not Found] Allowing Cognito to invoke lambda function cannot be completed.
ResourceNotFoundException (Request ID: e963254b-8d2a-49fa-b012-xxxxxxxx)

Note - if I add a Cognito Sync trigger in the lambda config dashboard and then try to configure a trigger in the user pool it works.

Anticlockwise answered 15/12, 2021 at 12:41 Comment(0)
D
6

You can change to old console, set lambda trigger, it's worked. Then you can change to new console again.

Doggett answered 24/12, 2021 at 11:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.