How to setup bastion hosts for accessing EC2 instances that are in different VPCs

0

Hello,

Currently, we have setup which uses different bastion hosts for EC2 in different VPCs.

Is it possible to use only one bastion host to access all EC2 hosts which are in different VPCs by using VPC peering?

Is it recommended? Did any one try it?

Thanks

Maan
已提問 1 年前檢視次數 707 次
2 個答案
1

Hi, you can use a single bastion host to access all your EC2 instances anywhere they reside as long as there is a connectivity between the bastion host and the instances that you're trying to reach. There are several ways that you can use to connect VPCs together such as VPC-Peering, Transit Gateway, site-to-site VPNs, etc..

I would recommend using AWS System Manager as a way to access your EC2 instances no matter where they reside instead of using a bastion host.

You can read a bit about it here:

https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html

profile pictureAWS
mml
已回答 1 年前
profile pictureAWS
專家
已審閱 1 年前
  • Thanks for the answer,

    Does System Manager (Session Manager) support RDS access, or only SSH access to EC2 instances?

0

if you just need CLI access then better to use cloudshell than bastion hosts.

But yes, VPC peering / TGW can be used to access other VPC from a single bastion host as long connectivity/ACL permits.

https://aws.amazon.com/blogs/aws/aws-cloudshell-command-line-access-to-aws-resources/

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南