简体   繁体   中英

AWS API Gateway : Allowing access to API from a lamba function in another AWS account

I have created a REST API using lambda and API gateway.

I want to give access for this API to another lambda function which is running in another AWS account.

I was thinking to create IAM based authorisation for this API. But I am not sure if this cross-AWS account based IAM authorisation is feasible?

Any better suggestions?

You can assume a role in the target account and then invoke the lambda directly using the temporary credentials. This method does not require an integration with API gateway.

You can also use IAM Authentication from anywhere if the API is publicly available. You will have to store the designated credentials.

Reference:

https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-assume-iam-role/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM