One workaround for this issue is described here:
However, this is very confusing and hard to troubleshoot.
- I configure AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as project environment variables, but the values in the build are not the ones I set.
- Tried the same with the org context: same result.
The env variables available during build are NOT the ones I set.
The reason (probably): CircleCI V1.0 used to have “AWS Permissions” page where those values are set. Our org/project had these set there before the page was removed. After the page was removed from the CircleCI UI, the values are still passed into the build environment and they override the environment variables configured at the project level.
There is no way to remove that old configuration now.