AWS credentials in machine executor


#1

I still did not get an answer to the git credentials with user key (that enables me to clone other repos but in the machine scope it does not ).
Also, how do i get the aws credentials that i set in the project settings to work inside the container? I can’t set the env vars because they are being set in circle.yml verbatim.


Getting Started: Docker Engine
#2

If you are trying to evaluate variables in the env section, you currently can not do that. It will be supported in the future, but not right now. You can either use that as-is and evaluate it later on, or you can export it manually in the step you need.

I shared a post detailing the current state of the env vars:
https://discuss.circleci.com/t/circle-2-0-global-environment-variables/8681/11?source_topic_id=10058


#3

ok, what is the best practice to get the AWS credentials that i configured in circleci’s gui into the container so i can use aws api?


#4

I found your build in question and it does seem like a bug. I’ve reported it to our engineers to further investigate.

With that said, can you check for ~/.aws/config and/or ~/.aws/credentials?


#5

if that’s in the docker, the aws infra will look there automatically, and yet it failed. so is there a way to copy it from the “machine”?


#6

from within the container these paths are not available


V2: AWS permissions set in web UI not available in container
#7

Thanks for telling us about this. We filed a bug for the credentials being inaccessible on the machine executor.

In the mean time, as a workaround: you should be able to enter these keys as environment variables in the UI and they’ll get passed to the machine. According to the AWS CLI docs, the CLI looks for keys AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY.


#8

In the meantime, maybe add a note saying “only works for 1.0” in the UI?


AWS Credentials not auto-imported anymore
#9

This post is a year old and completely irrelevant. Though we don’t fill the AWS files like we did in 1.0, we expose the UI values as environment variables.

I will close this thread to avoid future confusion. Feel free to open a new one if you’re still seeing issues.


AWS Credentials not auto-imported anymore
#10