code-dumps/aws/ec2-with-public-ip.sh
2024-07-24 09:57:48 +08:00

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 "= = ="