Skip to content

Instantly share code, notes, and snippets.

@michaelBenin
Created May 11, 2017 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelBenin/25d268284cc1e8950196007d5aafbd9e to your computer and use it in GitHub Desktop.
Save michaelBenin/25d268284cc1e8950196007d5aafbd9e to your computer and use it in GitHub Desktop.
Change resources shell
#!/bin/bash
ids=$(aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" "Name=tag:Environment,Values=development" --query 'Reservations[*].Instances[*].InstanceId' --output text)
echo "Creating tags"
aws ec2 create-tags --resources $ids --tags 'Key=Version,Value=1.1'
echo "Tags created"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment