1 Answer
- Newest
- Most votes
- Most comments
1
Hello.
In Account A's Lambda, use the Assume role for Account B's IAM role to obtain temporary credentials.
I think the code provided in the following document will be helpful.
I think you can access Lambda in account A using the IAM role in account B to access Lambda in account C using the method described in the document below.
https://repost.aws/knowledge-center/lambda-function-assume-iam-role
Try setting the following policy in the resource-based policy located in AWS account C.
By setting this, account B will be able to access account C's Lambda.
{
"Version": "2012-10-17",
"Id": "default",
"Statement": [
{
"Sid": "lambda-resource-policy",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<accountB-id>:root"
},
"Action": "lambda:InvokeFunction",
"Resource": "arn:aws:lambda:<region-code>:<accountC-id>:function:<function-name>"
}
]
}
Relevant content
- asked 2 years ago

Thanks Riku