I want to run a lambda in Account B when any object comes into Account A S3 bucket.
But I heard that we can access Lambda from the same account S3 only, for cross-ac
I managed to successfully trigger an AWS Lambda function in Account B from an upload to an Amazon S3 bucket in Account A.
Account-A.S3-bucket -> Account-B.Lambda-function
Here's what I did:
lambda:InvokeFunction on the Lambda functionGetObject access from anywhere (this should be locked-down further, but was sufficient for the experiment)ObjectCreate (All) on the S3 bucket, referencing the Lambda function via its ARNI then repeated the experiment with the bucket in a different region and it failed, saying:
The notification destination service region is not valid for the bucket location constraint