Skip to content

Instantly share code, notes, and snippets.

@tskinner-oppfi
tskinner-oppfi / aws-credentials.sh
Created August 5, 2024 16:45 — forked from inkblot/aws-credentials.sh
Authenticate to vault using IAM instance profile credentials in bash using curl, openssl, and jq
#!/bin/bash
_SELF="${0##*/}"
_HERE="$(dirname $(realpath ${0}))"
function aws_instance_profile_arn() {
curl -s http://169.254.169.254/2019-10-01/meta-data/iam/info | jq -r .InstanceProfileArn
}
function aws_instance_profile_name() {