Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (790 points)
How can I assign a public DNS to an EC2 instance?

2 Answers

0 votes
by (1.4k points)

There are 2 ways to do the same :

METHOD-1

While launching the instance,

1) Go to Configure instance 

2) You will see 'Auto-assign Public IP' with a drop-down menu

3) Choose Enable and launch the instance

METHOD 2

1) Login to https://console.aws.amazon.com/console

2) Click on Services and choose VPC

3) Go to Your VPCs and select the VPC connected to your instance

4) Click on Actions and you will get a drop-down menu

5) Choose: Edit DNS Hostnames

6) Change the option to YES

0 votes
by (2.8k points)

In order to assign a public DNS to a EC2 instance, the very first thing that we need to make sure is that the EC2 instance has public address assigned to it.

Now in order to do the same, visit your EC2 dashboard, and click on Launch instance, then choose the image type and instance. After this configure the instance, by selecting the correct VPC, make sure your are enabling auto-assign public IP. And then launch your instance. Once launched, you can go to your instance and in the description option check the public DNS

Related questions

0 votes
1 answer

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...