Reputation: 9305
I am using trying to invoke a Lambda from another Lambda, I am getting the error:
AccessDeniedException: User: [role ARN] is not authorized to perform: lambda:InvokeFunction on resource: [Lambda ARN]
After researching, I found put that I need to attach a Policy to the IAM user to allow the action.
I'm wondering if there's any AWS Managed Policy which allows lambda:InvokeFunction
?
If not, what would be the best minimalist policy JSON to create?
Upvotes: 7
Views: 21309
Reputation: 2727
A managed role would be the AWSLambdaRole
.
If you want to create it on your own:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": "<ARN of the function which is allowed to be invoked>"
}
]
}
For the ARN (Amazon Resource Name) you could also put *
(then all functions are allowed to be invoked). Also, you could provide a list of multiple function ARNs.
Upvotes: 11