I have been trying to use an IAM role while creating a API in API Gateway using a cloudformation template so that API Gateway can invoke the Lambda function which is set as an endpoint for a specific GET / POST call.
I came across this while searching :- How can I grant permission to API Gateway to invoke lambda functions through CloudFormation?
This is helpful if there's one lambda function to be invoked. But if the API is being deployed using a JSON / Swagger definition and there are multiple lambda functions as endpoints then all those need to be added to the cloud formation template.
Is there any other Template Resource that can be used to associate an IAM role to the API Gateway instead of using AWS::Lambda::Permission ?