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

Viewed 575

Docker compose addition for logging:

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

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.

Also, something I learnt is that it's not enough to provide aws credentials to the client. As per docker documentation:

You must provide AWS credentials to the Docker daemon[...]

Is it possible that the actual ~./aws/credentials file should be mounted within the Docker Desktop Virtual Machine?

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.

0 Answers
Related