Specify or edit lambda trigger details

0

I am in the process of converting an existing Lambda function from Node.js 14 to Node.js 18. The function has an API Gateway trigger.

When I attach an existing API Gateway to the Node.js 18 function, the console creates a new resource in the gateway, named after the function, a new method named 'ANY' under that resource, and configures the trigger with the newly created resources. When I then select the trigger the Edit button does not become enabled and I cannot find a way to change the details of the trigger.

Is there a way I can select a pre-existing resouce and method from the gateway when I define the trigger? Or is there a way I can edit the trigger configuration to use the existing gateway resource rather than the one created by the console?

Thanks

2 Answers
0

When you are adding the API gateway trigger to the lambda function, you would be able to see two options under Intent. You can choose Use existing API option to use the existing API gateway resource as a trigger for your lambda function. Attached the below image for your reference.

Enter image description here

AWS
answered 10 months ago
0

Thanks. I did choose Use existing API. The results I described are what happend when I made that choice. The new resource and method were added to the existing API, and then bound to the trigger of the new lambda function. Sorry I did not make that clear.

DUzzell
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions