localstack to access security credentials for endpoint 169.254.169.254

Viewed 176

In my application, to access the aws_access_key,aws_secret_key, and token I use

ec2_instance_profile_role_name=$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials)

# Get the ECS Task IAM role current security credentials
aws_session_response=$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${ec2_instance_profile_role_name})

and I derive my aws_access_key,aws_secret_key, and token from aws_session_response so, I'm wondering how to replicate the same in localstack? is there any alternative approach?

0 Answers
Related