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.

1
  • 2
    You could use a VPN, assuming the subnets are different.
    – jordanm
    Oct 29, 2017 at 4:10

1 Answer 1

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/

3
  • 1
    Specific link that addresses lightsail: aws.amazon.com/blogs/aws/…
    – dmourati
    Oct 29, 2017 at 4: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. Oct 29, 2017 at 8: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, 2017 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .