带内部 DNS 的 AWS SSH

AWS SSH with Internal DNS

我正在设置一个 AWS EMR 集群,但在连接到它时我感到很困惑。在我看到的所有示例中,DNS 都是 public 并且通过 SSH 连接到实例是直接的。对于我生成的集群,它是一些内部 dns ip-***.ec2.internal。我认为这是因为这与 VPC 有关,但我不确定如何访问它。

我确实有用于端口转发的堡垒设置 - 这是我应该做的吗?

TL;DR 您创建的集群似乎位于私有子网中,因此您需要使用堡垒主机来访问它。

我创建了几个集群来测试,一个在 public 子网中,一个在私有子网中。

如下图所示,public 集群有一个 public DNS 名称,私有集群使用 ec2.internal DNS 名称。

You can launch EMR clusters in both public and private VPC subnets. This means you do not need internet connectivity to run an EMR cluster; however, you may need to configure network address translation (NAT) and VPN gateways to access services or resources located outside of the VPC, for example in a corporate intranet or public AWS service endpoints like AWS Key Management Service.

Important: Amazon EMR only supports launching clusters in private subnets in releases 4.2 or greater.

最后一点我不清楚,因为我在图中显示的示例中启动了 emr-5.19.0。 YMMV

资源

https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-vpc-subnet.html