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

随声附和 提交于 2021-02-08 08:20:53

问题


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.

来源:https://stackoverflow.com/questions/60838429/awslogs-logging-driver-issue-nocredentialproviders-no-valid-providers-in-chai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!