-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refresh AWS credentials periodically #31
Conversation
… static creds on the machine, no need to waste compute refreshing
54b13cf
to
72b41a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few changes, but looks great!
boltrouter/aws_credentials_client.go
Outdated
awsCredentialsMap.Store(awsConfig.Region, cred) | ||
return cred, nil | ||
} | ||
|
||
func (br *BoltRouter) RefreshAWSCredentials(ctx context.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason for this method to be part of BoltRouter? can we make it private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope vestigial, made private.
Refresh AWS credentials in Bolt router every 30 minutes since on EC2 the temporary credentials have a 1 hour expiration.