We are trying to make our Lambda function a centralize kind of thing which can be invoked by a secrets manager from different accounts. So Lambda app can be used across multiple accounts for the automatic rotation of secrets.
Basically in this image, we want to select a lambda function that is deployed to a different account.
We have tried the steps below to achieve our goal but none of these have worked so far:
- Grant access across different AWS accounts using IAM roles and assume role.
- Add a resource based policy into function app
Note: Secrets manager and Lambda Function are in the same region.