Created
October 19, 2021 17:00
-
-
Save mridang/fc63acd691224fa7ad221411af1455fc to your computer and use it in GitHub Desktop.
Helper command to fetch the IP address of the master node of running EMR cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aws emr describe-cluster --cluster-id @1 | jq --raw-output '.Cluster .MasterPublicDnsName | sub("ip-(?<ip1>[0-9]*)-(?<ip2>[0-9]*)-(?<ip3>[0-9]*)-(?<ip4>[0-9]*).*$"; "\(.ip1).\(.ip2).\(.ip3).\(.ip4)")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment