grep -oiE '([a-zA-Z0-9][a-zA-Z0-9-]{1,61}\.){1,}(\.?[a-zA-Z]{2,}){1,}'
Do you ever find yourself having to look through your AWS ELBs to find bad TLS/SSL configurations ?
aws elb describe-load-balancers --output json | jq -r '.LoadBalancerDescriptions[] | [ (.LoadBalancerName, .ListenerDescriptions[].Listener.Protocol), (.ListenerDescriptions[].PolicyNames[]), (.Scheme)] | @csv' >> all-loadbalancers.csv
List ELB Names, Listeners, Security Policy, and whether the ELB is Internal or Internet facing. Save as CSV
grep profile ~/.aws/config | sed -ne 's/^\[profile\s\(.*\)\]/export AWS_PROFILE=\1/p'
Note: If you are on a MacOS you will discover that this doesn't work due to the fun fact Mac does't use GNU sed ! (Boo Hiss !!!!) :-)
try this instead (2 ways):
grep profile ~/.aws/config | sed -ne 's/^\[profile[[:space:]]\(.*\)\]/export AWS_PROFILE=\1/p'
grep profile ~/.aws/config | sed -ne 's/^\[profile\(.*\)\]/export AWS_PROFILE=\1/p' | sed 's/ //2'