I want to rename 100 ec2 instances using cli how to do that ?
This will show all instance names :
aws ec2 describe-instances --filters "Name=tag:productionpriority,Values=productionpriority" --query 'Reservations[].Instances[].[ [Tags[?Key==`Name`].Value][0][0],PublicIpAddress, PrivateIpAddress, InstanceId, InstanceType, Placement.AvailabilityZone]'
But how to modify Instance name ie replace old name with new one ?
This worked for me:
ec2-create-tags i-xxxx --tag "Name=PROD-DEL-xxx"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With