Skip to content

Instantly share code, notes, and snippets.

@pahud
Created August 17, 2016 08:02
Show Gist options
  • Save pahud/98bf32e652378a99a0f7a030bf6f745b to your computer and use it in GitHub Desktop.
Save pahud/98bf32e652378a99a0f7a030bf6f745b to your computer and use it in GitHub Desktop.
list all registered ELB name from a given EC2 instanceId
#!/bin/bash
instanceId='i-XXXXXXXXXXXXX'
aws elb describe-load-balancers --query \
"LoadBalancerDescriptions[?Instances[?InstanceId=='${instanceId}']].LoadBalancerName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment