Learn how to Get the Occasion Profile connected to an AWS EC2
September 14, 2022 · 1 min · 32 phrases · Andrew
If you might want to get the IAM Position data from the connected EC2 function instantly, you are able to do the next:
IAM_ROLE=$(curl -s 169.254.169.254/newest/meta-data/iam/data |
jq -r '.InstanceProfileArn' | reduce -d'/' -f2)