大网数据广告活动
服务器运维问答

Why does an AWS EC2 instance need public and private DNS?

· 52CE 我爱测

I am creating my own VPC and was reading some documentation. AWS documentation for DNS with VPC (click here to view) says To enable an EC2 instance to be publicly accessible, it must have a public IP address, a DNS hostname, and …

问题原文

原帖链接 · Hurricane Development · CC BY-SA 3.0

I am creating my own VPC and was reading some documentation. AWS documentation for DNS with VPC (click here to view) says

To enable an EC2 instance to be publicly accessible, it must have a public IP address, a DNS hostname, and DNS resolution.

Is this true? Why?

Is a private IP address in combination with an elastic IP address not enough to access the instance publicly and privately?

已采纳解答

原帖链接 · Johnny · CC BY-SA 3.0

An Elastic IP address is a public IP address, so that takes care of public access.

While you can access your instance from within AWS's network with the public ElasticIP address instead of using the private IP address, you'll pay for it:

https://aws.amazon.com/ec2/pricing/

Data Transfer IN To Amazon EC2 From

  • Amazon EC2, Amazon RDS, Amazon Redshift and Amazon ElastiCache instances or Elastic Network Interfaces in the same Availability Zone
    • Using a private IP address $0.00 per GB
    • Using a public or Elastic IP address $0.01 per GB

Data Transfer OUT From Amazon EC2 To

  • Amazon EC2, Amazon RDS, Amazon Redshift or Amazon ElastiCache instances, Amazon Elastic Load Balancing, or Elastic Network Interfaces in the same Availability Zone
    • Using a private IP address $0.00 per GB
    • Using a public or Elastic IP address $0.01 per GB

You don't need DNS to access the instance -- the IP alone is sufficient.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-05-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。