Skip to content

Commit

Permalink
Merge pull request #4 from panubo/feature/retry-metadata-requests
Browse files Browse the repository at this point in the history
retry metadata access 5 times
  • Loading branch information
bilco105 authored Oct 28, 2019
2 parents afbb1ef + a353a39 commit 114218b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ type EC2Instance struct {
//GetEC2InstanceData returns a populated EC2Instance struct with the current EC2 instances' metadata
func GetEC2InstanceData(tagPrefix string) EC2Instance {
var ec2Instance EC2Instance
sess := session.New()
sess := session.New(&aws.Config{
MaxRetries: aws.Int(5),
})

creds := credentials.NewCredentials(
&ec2rolecreds.EC2RoleProvider{
Expand Down

0 comments on commit 114218b

Please sign in to comment.