0

I have a lambda in a vpc in an aws account and I have another lambda in a vpc in another aws account. How to make them be able to communicate with each other ?

Karias Bolster
  • 955
  • 3
  • 17
  • 31
  • This seems to mention you can do Cross Account Lambda invocations https://hub.iopipe.com/aws-lambda-faq/public-cross-account-functions-on-aws-lambda – David Webster Jan 15 '19 at 11:16

3 Answers3

2

You can use the appropriate AWS SDK to invoke a Lambda (even if it is in a VPC). The Lambda making the call though, will need internet access (NAT Gateway).

The better way to do it (IMO) would be to link them via SNS. So here are some relevant links:

Using Amazon SNS for System-to-System Messaging with an AWS Lambda Function as a Subscriber

Invoke Lambda using SNS from Outside Account

K Mo
  • 2,125
  • 8
  • 16
1

You can do VPC peering from one AWS account to another AWS account, setup ACL's and have the Lambda's communicate across the AWS accounts.

M.A Majid
  • 201
  • 1
  • 2
0

You can peer the vpcs (keep in mind IP address ranges cannot overlap if you do this) or expose the lambdas using api gateway and get them to invoke each other using http requests.

Moe
  • 2,672
  • 10
  • 22