Raphael Rafatpanah
Raphael Rafatpanah

Reputation: 19967

API Gateway method integrates with lambda function but lambda function claims it has no triggers

I have a lambda function that I'd like to trigger via HTTP request.

When I click add trigger to a lambda function, I get an API Gateway API set up with:

 method: ANY

Great. Now, when viewing this lambda function, I see a trigger has been configured.

However, I would like to restrict the trigger to only allow POST requests.

So I deleted the API Gateway method ANY, and created a new method POST, under the same resource, using an integration type of Lambda Function. I select my region, and sure enough, my existing lambda function is autocompleted.

However, when I view the triggers tab on the lambda function itself, it shows that there are no triggers.

What am I missing?

Upvotes: 1

Views: 634

Answers (1)

RyanG
RyanG

Reputation: 4152

If you need flexible control of the API, I would suggest to use the API Gateway console to mange your API. Lambda triggers should only be used for simple use-cases - API methods configured through API Gateway will not show up in the Lambda triggers list.

Upvotes: 5

Related Questions