Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

404 error while adding lambda trigger in cognito user pool

Tags:

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.

like image 428
Himanshu Patil Avatar asked Dec 15 '21 12:12

Himanshu Patil


1 Answers

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

like image 74
hoangquyy Avatar answered Sep 30 '22 18:09

hoangquyy