Bash My Aws


Published:   May 9, 2022

Tags:
Ref: https://github.com/bash-my-aws/bash-my-aws

Nice utility to work with awscli faster.

If you work with Ip address, ddd this function to bashrc and reload(source ~/.bashrc) to get instance-id

1
2
3
function get-instance-id() {
        aws ec2 describe-instances --filters Name=private-ip-address,Values=$1 --query Reservations[].Instances[].InstanceId --output text
}

To get instance id

1
get-instance-id 192.168.1.1

To fetch instance tags

1
instance-tags i-0fd5c4df38353cd0


Let me know if you have any questions or comments.
It will help me to improve/learn.


< Older   Further Reading   Newer >