New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of ILAB_AWS_S3_SESSION_TOKEN for EC2 with Instance profile and IAM role #36

Open
abdennour opened this Issue Oct 11, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@abdennour

abdennour commented Oct 11, 2018

When we assigned IAM role to an EC2 instance, the credentials to access the S3 will not only ILAB_AWS_S3_ACCESS_KEY and ILAB_AWS_S3_ACCESS_SECRET but also a token.

Those 3 settings are automatically available in the EC2 instance attached to an instance profile with IAM role.

ENDPOINT=http://169.254.169.254/latest/meta-data/iam/security-credentials/;
KEYS=$(curl -s $ENDPOINT`curl -s $ENDPOINT`);

# Fill in ILAB env vars
ILAB_AWS_S3_ACCESS_KEY=$(echo $KEYS | jq ".AccessKeyId");
ILAB_AWS_S3_ACCESS_SECRET=$(echo $KEYS | jq ".SecretAccessKey");
#⚠️⚠️⚠️ the one below is missing ⚠️⚠️⚠️⚠️
ILAB_AWS_S3_SESSION_TOKEN=$(echo $KEYS | jq ".Token"); # << WE REQUEST the support of this one

@abdennour abdennour changed the title from Support of ILAB_AWS_S3_TOKEN for EC2 with Instance profile and IAM role to Support of ILAB_AWS_S3_SESSION_TOKEN for EC2 with Instance profile and IAM role Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment