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