LoginSignup
0
0

More than 3 years have passed since last update.

aws

Last updated at Posted at 2018-11-19

EC2

  • filter search

Below will find "web1", "web41", "web444" instances which have that tag "Name".

tag:Name : ^web[0-9]*

CloudWatch

scripts

  • get specific EIP's Name
ips=(
xx.xx.xx.xx
yy.yy.yy.yy
)

for ip in ${ips[@]}
do
echo -ne "$ip\t"
echo $(aws ec2 describe-addresses --filters "Name=public-ip,Values=${ip}" | jq '.Addresses[].Tags[] | select(."Key" == "Name").Value  ')
done
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0