aws / aws/aws-xray-daemon

local ~/.aws folder not loaded by docker container

Open
#202 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
193
Forks
73
Avg merge
2d 7h
Merged PRs (30d)
3

Description

When I run daemon locally for dev and test purposts If I mount my local ~/.aws foleder into docker container, than credentials are not loaded by the daemon. As a result I get an error
`[Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain. Deprecated.`

**docker-compose.yml**
version: "3.9"

services:
xray-daemon:
image: amazon/aws-xray-daemon
ports:
- 2000:2000/udp
environment:
- AWS_REGION=${AWS_REGION}
volumes:
# why credentials form ~/.aws profile doesn't work ?
- ~/.aws:/root/.aws
command: "--local-mode --log-level dev"




**logs:**
xray-daemon_1 | 2023-07-31T18:05:01Z [Debug] processor: sending complete batch
xray-daemon_1 | 2023-07-31T18:05:01Z [Debug] processor: segment batch size: 50. capacity: 50
xray-daemon_1 | 2023-07-31T18:05:02Z [Debug] processor: sending partial batch
xray-daemon_1 | 2023-07-31T18:05:02Z [Debug] processor: segment batch size: 15. capacity: 50
xray-daemon_1 | 2023-07-31T18:05:08Z [Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain. Deprecated.
xray-daemon_1 | For verbose messaging see aws.Config.CredentialsChainVerboseErrors
xray-daemon_1 | 2023-07-31T18:05:11Z [Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain. Deprecated.
xray-daemon_1 | For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Contributor guide

Open the contributing guide

Research direction

Start with the docker-compose.yml example and reproduce the mounted ~/.aws setup using the documented local daemon command. Confirm the container can load the credentials and send segment batches without the NoCredentialProviders error, then verify the behavior in the emitted logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, go
Domain
cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.