Skip to content

Commit

Permalink
fix: Assume role
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreZiviani committed Jun 13, 2023
1 parent fdf4754 commit c7fc744
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions exporter/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ func (m *Metrics) NewHealthClient(ctx context.Context) {
cname = strings.TrimSuffix(cname, ".")
region := strings.Split(cname, ".")[1]

cfg, err := newAWSConfig(ctx, config.WithRegion(region))

if err != nil {
panic(err.Error())
}
cfg := m.awsconfig
cfg.Region = region

m.health = health.NewFromConfig(cfg, health.WithEndpointResolver(health.EndpointResolverFromURL(fmt.Sprintf("https://%s", cname))))
}
Expand Down

0 comments on commit c7fc744

Please sign in to comment.