Skip to content

Prometheus 3.7.2: EC2 service discovery fails (failed to get shared config profile) #17397

@danielrolfes2307

Description

@danielrolfes2307

What did you do?

Updated to version 3.7.2

What did you expect to see?

Expected that EC2 service discovery works (again) after #17343
has been fixed in version 3.7.2

What did you see instead? Under which circumstances?

EC2 service discovery (still) fails to discover targets.
Revert to version 3.6.0 resolved the issue.

System information

No response

Prometheus version

prometheus, version 3.7.2 (branch: HEAD, revision: 7f2e7c86f800230ce13ce022cddaeba7cd2a9cc1)
  build user:       root@b0b421c97536
  build date:       20251022-12:42:42
  go version:       go1.25.3
  platform:         linux/amd64
  tags:             netgo,builtinassets

Prometheus configuration file

scrape_configs:
  - job_name: 'REDACTED'
    ec2_sd_configs:
        - region: "eu-central-1"
          profile: "arn:aws:iam::REDACTED:instance-profile/prometheus-monitoring"
          port: 9095

Alertmanager version


Alertmanager configuration file

Logs

time=2025-10-24T13:27:40.580+02:00 level=ERROR source=refresh.go:90 msg="Unable to refresh target groups" component="discovery manager scrape" discovery=ec2 config=REDACTED err="could not create aws config: failed to get shared config profile, arn:aws:iam::REDACTED:instance-profile/prometheus-monitoring"

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