AWS Permission settings adding a space to ENV VARS in Docker environment

awscli
aws
2.0

#1

While trying to debug a failing build and deploy on CircleCI2.0, I rebuilt with SSH enabled and tried to use the Python AWS CLI tool manually. I recieved this error:

circleci@5eb7ce8a8160:~$ aws s3 ls

An error occurred (InvalidArgument) when calling the ListBuckets operation: Authorization header is invalid – one and only one ’ ’ (space) required

I checked to see if the environment variables were being passed correctly to the container and the access key appears to have a space prepended to it. These variables have not changed recently and work fine in version 1.

circleci@5eb7ce8a8160:~$ env | sort | grep 'AWS_'
AWS_ACCESS_KEY_ID= AKxxxxxxxxxxxxxxxx
AWS_SECRET_ACCESS_KEY=YQxxxxxxxxxxxxxxxxxxxxx+xxxxxxxxxxx

Regards,
Tom


#2

This can be closed as it isn’t a bug. I re-added the keys and space disappeared. It must have been that whitespace was stripped in version 1 and not 2 and covered up for our mistake of adding problematic whitespace when pasting the ENV vars into the UI.

Regards,
Tom


#3