Async Lambda invoke from another Lambda

I think the issue here is that your Lambda function needs a resource policy that allows its invocation from your test function.

Unfortunately, adding "InvokeFunction", "InvokeAsync" privileges to your Lambda role will not work. This is essentially saying your Lambda can invoke other Lambdas.

It’s easy to see in the AWS console if your Lambda function can be invoked by other Lambdas/whomever by going into the Lambda service page, picking your function, going to the Triggers tab and expanding the View function policy drop down.

I’m on the same boat as you, looking for a way to assign invocation permissions from the Serverless configuration, but I’m coming up short. But not all is lost! You can either add it manually in the console, or using the AWS CLI by using the add-permission functionality: http://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html

I’m curious if adding permissions to invoke your Lambda to your test function’s app role policy would work.

Edit:

To add to all this I’ll say that, generally speaking, you don’t want to invoke a Lambda from another (unless you have a good reason, which in my case may be true) because debugging integration issues between the two becomes more cumbersome. Refer to this excellent conversation for more info: Best Practice Question: API call, Lambda.Invoke, or require()?