Docker Community Forums

Share and learn in the Docker community.

Awslogs logging driver issue - NoCredentialProviders: no valid providers in chain

   app:
        logging:
              driver: awslogs
              options:
                awslogs-region: eu-west-3
                awslogs-group: sharingmonsterlog

I have added my AWS credentials to my mac using the aws configure command and the credentials are stored correctly in ~/.aws/credentials.

I am using docker desktop 2.2.0.4.

When I run docker-compose up I get the following error:

ERROR: for app Cannot start service app: Failed to initialize logging driver: NoCredentialProviders: no valid providers in chain.

Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors

ERROR: Encountered errors while bringing up the project.

I believe this is because credentials need to be present in Docker Daemon. If I understand correctly, Docker for Mac is possible thanks to a linux VM where - I suppose - the Docker Daemon belongs.

Should I mount credentials in the VM which Docker Desktop runs?

Honestly I have been trying to fix this for 4 days and I am running out of ideas… Any help is appreciated!

Thanks in advance.