4

Say I have accounts A and B and light sail instances a and b in each account. a and b are in the same region and zone. Is it possiple for a and b to interconnect with private IP? For example, after I log in to a, can I ssh to b using b's private IP?

I searched documents and I think it's probably something related to VPC, but it's a little bit complicated to a new learner. Can anyone specify how to configure it? Thanks in advance.

liwt31
  • 191
  • 2
  • 4

1 Answers1

8

It is called VPC Peering.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-peering.html

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either VPC can communicate with each other as if they are within the same network. You can create a VPC peering connection between your own VPCs, or with a VPC in another AWS account. In both cases, the VPCs must be in the same region.

Guide here: http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/

Appleoddity
  • 3,290
  • 2
  • 10
  • 27
  • 1
    Specific link that addresses lightsail: https://aws.amazon.com/blogs/aws/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/ – dmourati Oct 29 '17 at 04:20
  • 1
    @dmourati you can only peer a Lightsail VPC to the *Default* VPC of the *same* AWS account. Peering is not transitive, so Lightsail-to-Lightsail across accounts using VPC peering is not supported. – Michael - sqlbot Oct 29 '17 at 08:04
  • Not a lightsail user but OP did mention lightsail so I figured the above link would be relevant. Good to know the limitations of the simplified approach. – dmourati Oct 29 '17 at 18:29