Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get ip from instance id boto3

import boto3
ec2 = boto3.client("ec2")
res = ec2.describe_instances(InstanceIds=['<instance-id>',])
print(res["Reservations"][0]["Instances"][0]["PublicIpAddress"])
 
PREVIOUS NEXT
Tagged: #ip #instance #id
ADD COMMENT
Topic
Name
5+7 =