Wednesday, October 23, 2013

Using the AWS CLI to get a public hostname



We use this for the next step,  amending Putty.


  • Assumptions : 
  • We know the instance-id 
  • We have a working CLI. 
So we use ec2-describe-instances 


C:\Users\Chris\.aws>
We use a filter to only get info for our instance. 
We use a query to only output the Public DNSNAME 
aws ec2 describe-instances 

--filters "Name=instance-id,
Values=i-xxxxxx"
 --query
 "Reservations[*].Instances[*].{dz:PublicDnsName}" 
--output  text



C:\Users\Chris\.aws>aws ec2 describe-instances --filters "Name=instance-id,Value
s=i-xxxxxxxx" --query "Reservations[*].Instances[*].{dz:PublicDnsName}" --output
 text
ec2-255-255-255-5255.eu-west-1.compute.amazonaws.com


So now we have our public DNSNAME, and with that we can change our putty settings ! 

3 comments:

IT Tutorials said...

It is really a great work and the way in which you are sharing the knowledge is excellent. aws training in omr | aws training in velachery | best aws training center in chennai

IT Tutorials said...

It is really a great work and the way in which you are sharing the knowledge is excellent. aws training in omr | aws training in velachery | best aws training center in chennai

likitha said...

simply superb,mind blowing, i will share your blog to my friends also
AWS Online Training