lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment
MIT License
5.83k stars 431 forks source link

fix: Don't set default values for ACCESS_KEY_ID and SECRET_ACCESS_KEY #303

Closed jakub-bochenski closed 4 years ago

jakub-bochenski commented 4 years ago

Set them to blank in case nulls are not allowed. This breaks the default AWS credentials provider. I tried to use profile credentials from ~/aws/.credentials but it's impossible now as the chain picks up those mock defaults instead. Setting the envs to blank in container doesn't help as I see the mock values are still somehow set.

docker run  -v "$HOME/.aws/credentials:/home/sbx_user1051/.aws/credentials:ro,delegated"  ...
mhart commented 4 years ago

Thanks for this – will need to think about it a bit as it could be breaking change (although unlikely)

mhart commented 4 years ago

Have pushed up a change that removes this mock value (I ended up modifying all runtimes for this).

Let me know if that fixes your situation!

jakub-bochenski commented 4 years ago

Thanks, I can confirm it works with image sha256:404715798687991ca533c3192d8827c6fafb7659616add63332146dc3764fce4