{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/25468","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/25468/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/25468/comments","events_url":"https://api.github.com/repos/docker/docker/issues/25468/events","html_url":"https://github.com/docker/docker/issues/25468","id":169750516,"number":25468,"title":"NoCredentialProviders error with awslogs logging driver","user":{"login":"tlvince","id":323761,"avatar_url":"https://avatars.githubusercontent.com/u/323761?v=3","gravatar_id":"","url":"https://api.github.com/users/tlvince","html_url":"https://github.com/tlvince","followers_url":"https://api.github.com/users/tlvince/followers","following_url":"https://api.github.com/users/tlvince/following{/other_user}","gists_url":"https://api.github.com/users/tlvince/gists{/gist_id}","starred_url":"https://api.github.com/users/tlvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlvince/subscriptions","organizations_url":"https://api.github.com/users/tlvince/orgs","repos_url":"https://api.github.com/users/tlvince/repos","events_url":"https://api.github.com/users/tlvince/events{/privacy}","received_events_url":"https://api.github.com/users/tlvince/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/logging","name":"area/logging","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-06T15:10:11Z","updated_at":"2016-08-09T09:31:56Z","closed_at":null,"body":"**Output of `docker version`:**\r\n\r\n```\r\nDocker version 1.12.0, build 8eab29e\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 7570\r\n Running: 3\r\n Paused: 0\r\n Stopped: 7567\r\nImages: 11\r\nServer Version: 1.12.0\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 15171\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: null overlay host bridge\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: apparmor seccomp\r\nKernel Version: 4.2.0-41-generic\r\nOperating System: Ubuntu 15.10\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 3.858 GiB\r\nName: example\r\nID: XBFR:JJ2K:4H3E:EXG7:6FRF:WYXK:GF4A:UJNV:OCVO:YYHG:PQJH:2IXO\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nLabels:\r\n provider=amazonec2\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n\r\ndocker-machine initialised EC2 (Ubuntu) instance\r\n\r\n**Steps to reproduce the issue:**\r\n\r\n1. Create an IAM user and set `/root/.aws/credentials` (per [docs](https://docs.docker.com/engine/admin/logging/awslogs/#/credentials) and [example.ini](https://github.com/docker/docker/blob/3f970819bb4231375f7821aa54670fd59e384f4d/vendor/src/github.com/aws/aws-sdk-go/aws/credentials/example.ini))\r\n\r\n2. Start a container using the awslogs driver\r\n\r\n    ```\r\ndocker run \\\r\n  --log-driver awslogs \\\r\n  --log-opt awslogs-region=eu-west-1 \\\r\n  --log-opt awslogs-group=example \\\r\n  --log-opt awslogs-stream=example \\\r\n hello-world\r\n    ```\r\n\r\n**Describe the results you received:**\r\n\r\n```\r\nERROR: for hello-world  Cannot start hello-world: b'Failed to initialize logging driver: NoCredentialProviders: no valid providers in chain. Deprecated. \\n\\\r\ntFor verbose messaging see aws.Config.CredentialsChainVerboseErrors'\r\n```\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\nWhat I've tried (via #19392 and #16551):\r\n\r\n* Exporting AWS_ACCESS_KEY_ID (etc.) in `/etc/default/docker`\r\n* Creating a `~/.aws/credentials` file (for both root and ubuntu)\r\n* Passing them in at runtime via a .env file"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/238502181","html_url":"https://github.com/docker/docker/issues/25468#issuecomment-238502181","issue_url":"https://api.github.com/repos/docker/docker/issues/25468","id":238502181,"user":{"login":"tlvince","id":323761,"avatar_url":"https://avatars.githubusercontent.com/u/323761?v=3","gravatar_id":"","url":"https://api.github.com/users/tlvince","html_url":"https://github.com/tlvince","followers_url":"https://api.github.com/users/tlvince/followers","following_url":"https://api.github.com/users/tlvince/following{/other_user}","gists_url":"https://api.github.com/users/tlvince/gists{/gist_id}","starred_url":"https://api.github.com/users/tlvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlvince/subscriptions","organizations_url":"https://api.github.com/users/tlvince/orgs","repos_url":"https://api.github.com/users/tlvince/repos","events_url":"https://api.github.com/users/tlvince/events{/privacy}","received_events_url":"https://api.github.com/users/tlvince/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T09:31:56Z","updated_at":"2016-08-09T09:31:56Z","body":"@samuelkarp thanks for the well thought through and patient response. Setting environment variables in the systemd service file (`/etc/systemd/system/docker.service` in Ubuntu) worked for me.\r\n\r\nI'm not sure if further resolution is needed here besides perhaps adding this as a note to the [awslogs docs](https://docs.docker.com/engine/admin/logging/awslogs/#/credentials); feel free to close this issue. Cheers!"}}
{"actor":{"display_login":"tlvince"}}