code-dumps/aws/ec2-with-public-ip.sh

7 lines
213 B
Bash
Executable File

#!/usr/bin/env bash
aws sts get-caller-identity --query Account
aws ec2 describe-instances --query 'Reservations[].Instances[?PublicIpAddress != `null`].[InstanceId, PublicIpAddress]' --output text
echo "= = ="