1

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?

2
  • Have you tried it? Have you considered that they just consider an IP address without a DNS name useless enough that they have written "must have" where "should have" would be more correct? (I don't know this, just a guess).
    – Sven
    May 2, 2016 at 20:19
  • @Sven Yea, Ill give it a shot. Why would it be useless? Maybe the server is used in the backend or maybe I use my own dns to resolve to that IP? Am I understanding this correctly? May 2, 2016 at 20:23

1 Answer 1

3

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.

You must log in to answer this question.

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