You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to send my docker logs to Aws Cloudwatch. Don't discard it for being "something I could look up", I've spent tons of hours searching through documentation and tutorials.
I've installed AWS-cli and configured it, so ~/.aws/config is filled with my credentials. I've also set temporarily the session-variables just to be safe:
I've verified I can connect to AWS using:
aws s3 ls
This is my run config:
docker run --log-driver=awslogs --log-opt awslogs-group=docker-logs --log-opt awslogs-region=eu-west-1 --log-opt awslogs-create-group=true alpine echo 'hi cloudwatch'
When tailing /var/log/daemon.log I see the following error:
Feb 1 01:12:07 XXXXXX dockerd[7389]: time="2021-02-01T01:12:07.670370559+01:00" level=error msg="Failed to create log stream" errorCode=NoCredentialProviders logGroupName=docker-logs logStreamName=61c82801d22d3db4c68cdc5b3d1dcba51f97c77dea5ce33e262b712c0e2a23a7 message="no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" origError=""
I've also tried giving docker run the session-variables as --ENV-parameters. Still doesn't work.
I've also tried insert the EXPORT'ed variables into /etc/default/docker. Still no luck.
Docker has no problem uploading to cloudwatch if I run with log-driver="json-file" and point to a file. So it's only awslogs giving problems.
+1 -- it seems as though from this post docker/compose#2329 asking about the same thing that the solution might be to configure the docker service's environment to have the variables?
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
Problem description
I'm trying to send my docker logs to Aws Cloudwatch. Don't discard it for being "something I could look up", I've spent tons of hours searching through documentation and tutorials.
I've installed AWS-cli and configured it, so ~/.aws/config is filled with my credentials. I've also set temporarily the session-variables just to be safe:
EXPORT AWS_SECRET_ACCESS_KEY=...
EXPORT AWS_ACCESS_KEY_ID=...
EXPORT AWS_SESSION_TOKEN=...
I've verified I can connect to AWS using:
aws s3 ls
This is my run config:
docker run --log-driver=awslogs --log-opt awslogs-group=docker-logs --log-opt awslogs-region=eu-west-1 --log-opt awslogs-create-group=true alpine echo 'hi cloudwatch'
When tailing /var/log/daemon.log I see the following error:
Feb 1 01:12:07 XXXXXX dockerd[7389]: time="2021-02-01T01:12:07.670370559+01:00" level=error msg="Failed to create log stream" errorCode=NoCredentialProviders logGroupName=docker-logs logStreamName=61c82801d22d3db4c68cdc5b3d1dcba51f97c77dea5ce33e262b712c0e2a23a7 message="no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" origError=""
I've also tried giving docker run the session-variables as --ENV-parameters. Still doesn't work.
I've also tried insert the EXPORT'ed variables into /etc/default/docker. Still no luck.
Docker has no problem uploading to cloudwatch if I run with log-driver="json-file" and point to a file. So it's only awslogs giving problems.
Versions
$ aws --version
aws-cli/2.1.22 Python/3.7.3 Linux/4.19.57-v7l+ source/armv7l.raspbian.10 prompt/off
$ docker --version
Docker version 20.10.2, build 2291f61
Suggestions for a fix
Am I overlooking something? If not, please accept the given environmental variables.
The text was updated successfully, but these errors were encountered: