import boto3
client = boto3.client('ec2')
response = client.describe_addresses()
for i in response['Addresses']:
    if 'PrivateIpAddress' not in i:
        print(i['PublicIp'])

3fc2707fee277ffc932757fc4fb1bbc3e94facea
<mask token>

<mask token>
for i in response['Addresses']:
    if 'PrivateIpAddress' not in i:
        print(i['PublicIp'])

<mask token>
client = boto3.client('ec2')
response = client.describe_addresses()
for i in response['Addresses']:
    if 'PrivateIpAddress' not in i:
        print(i['PublicIp'])

import boto3
client = boto3.client('ec2')
response = client.describe_addresses()
for i in response['Addresses']:
    if 'PrivateIpAddress' not in i:
        print(i['PublicIp'])
