Skip to content

Changing endpoint to use IPv6 does not work #1639

@nicolabeghin

Description

@nicolabeghin

Describe the bug
When overriding endpoint in /opt/aws/amazon-cloudwatch-agent/bin/config.json to leverage IPv6-supported one as logs.<REGION>.api.aws in an IPv6-only EC2 instance, the agent keeps calling the IPv4 endpoint.

2025-04-06T10:36:32Z W! {"caller":"ec2tagger/ec2tagger.go:466","msg":"ec2tagger: Unable to describe ec2 tags for initial retrieval","kind":"processor","name":"ec2tagger","pipeline":"metrics/host","error":"RequestError: send request failed\ncaused by: Post "https://ec2.eu-south-1.amazonaws.com/\": dial tcp 52.119.128.109:443: i/o timeout"}

Steps to reproduce
Override endpoint in /opt/aws/amazon-cloudwatch-agent/bin/config.json through key endpoint_override

{
"agent": {
	"metrics_collection_interval": 60,
	"run_as_user": "cwagent"
},
"metrics": {
	"endpoint_override": "https://logs.eu-south-1.api.aws",

Then

/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json

You can check logs with

tail -f /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log

What did you expect to see?
No calls anymore to https://ec2.eu-south-1.amazonaws.com/

What did you see instead?
Calls to https://ec2.eu-south-1.amazonaws.com/

What version did you use?
1.300051.0b992

What config did you use?
config.json

Environment
Rocky Linux 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions