Can a Pinpoint campaign / journey custom channel call a lambda function in another AWS account?
I have tried adding the following permission to my lambda but it did not work:
aws lambda add-permission --function-name helloWorld --statement-id sid0 --action lambda:InvokeFunction --principal pinpoint.ap-south-1.amazonaws.com --source-arn arn:aws:mobiletargeting:ap-south-1:ACCOUNT_ID:apps/* --source-account ACCOUNT_ID
Can someone share any info on whether lambda functions can be called from services like S3, Pinpoint, etc. in other aws accounts? (I am aware of lambdas being allowed by external IAM users, but in my case the Pinpoint service makes the call to lambda and needs the required permissions)
Thank you Didier.
This solution involves invoking 2 lambdas, one acting like a proxy to bridge the permission issue.
Is there no way to use just 1 lambda in account A that can be called from a service like Pinpoint in account B? Pinpoint internally calls a lambda during a campaign / journey. This is specified through the Pinpoint API as an ARN string. I have tried giving the ARN of the lambda in account A, along with relaxing the permissions for this lambda to allow incoming requests from Pinpoint in account B, but this does not seem to work.
Can you positively confirm that Pinpoint campaign / journey lambda invocations cannot be done cross-account through a single lambda invocation?