Docker Community Forums

Share and learn in the Docker community.

Awslogs on Mac/docker-compose

I would like to send docker logs to aws cloud watch

it works fine on my ubuntu server

How do I pass credentials to docker-compose for logging to AWS on a MacOS ?

Here is my docker-compose.yml:

version: '3'
services:
  myservice:
    image: ...

    logging:
      driver: awslogs
      options:
        awslogs-region: us-east-1
        awslogs-group: some-group-name

I’m getting this

ERROR: for 1dec91dbd547_dockerlogs_myservice_1  Cannot start service myservice: failed to initialize logging driver: NoCredentialProviders: no valid providers in chain. Deprecated.
    For verbose messaging see aws.Config.CredentialsChainVerboseErrors

ERROR: for myservice  Cannot start service myservice: failed to initialize logging driver: NoCredentialProviders: no valid providers in chain. Deprecated.
    For verbose messaging see aws.Config.CredentialsChainVerboseErrors

I tried placing credentials to ~/.aws/credentials or environment variables - does not help

1 Like

Same Issue here. Please help!