Skip to content

Commit

Permalink
Update usage.go
Browse files Browse the repository at this point in the history
  • Loading branch information
bbernays committed Oct 30, 2024
1 parent bbc2552 commit 4736d83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion premium/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/retry"
awsConfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/marketplacemetering"
"github.com/aws/aws-sdk-go-v2/service/marketplacemetering/types"
Expand Down Expand Up @@ -274,7 +275,10 @@ func NewUsageClient(meta plugin.Meta, ops ...UsageClientOptions) (UsageClient, e
}

func (u *BatchUpdater) setupAWSMarketplace() error {
cfg, err := awsConfig.LoadDefaultConfig(context.TODO())
cfg, err := awsConfig.LoadDefaultConfig(context.TODO(), awsConfig.WithRetryer(func() aws.Retryer {
return retry.AddWithErrorCodes(retry.NewStandard(), (*types.DuplicateRequestException)(nil).ErrorCode())
}))

if err != nil {
return fmt.Errorf("failed to load AWS config: %w", err)
}
Expand Down

0 comments on commit 4736d83

Please sign in to comment.