A custom deployed application in an AWS account can also directly invoke the Lambda function. Figure 17.4 explains this. Create a Lambda function in one of the IAM user accounts and the same credentials will be used to invoke the Lambda function. You do not require additional permissions to invoke the function:
Â
Figure 17.4: Custom application publishes events and invokes a Lambda function
Reference URL: https://docs.aws.amazon.com/lambda/latest/dg/images/push-user-app-example-10.png
It is also possible to deploy a custom application in AWS account A, and invoke the Lambda function from AWS account B. AWS account B (that is, where the Lambda function is) must have cross-account permissions in the policy associated with the Lambda function. Figure 17.5 explains this:
Figure 17.5: Lambda function execution in cross...