Skip to content
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

Merged
merged 12 commits into from
May 16, 2023

Conversation

kmushegi
Copy link
Contributor

Refresh AWS credentials in Bolt router every 30 minutes since on EC2 the temporary credentials have a 1 hour expiration.

@kmushegi kmushegi requested a review from dskart May 12, 2023 21:42
@kmushegi kmushegi force-pushed the feat/refresh-aws-credentials-periodically branch from 54b13cf to 72b41a2 Compare May 15, 2023 19:14
Copy link
Collaborator

@dskart dskart left a 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!

awsCredentialsMap.Store(awsConfig.Region, cred)
return cred, nil
}

func (br *BoltRouter) RefreshAWSCredentials(ctx context.Context) error {
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope vestigial, made private.

boltrouter/aws_credentials_client.go Outdated Show resolved Hide resolved
boltrouter/aws_credentials_client.go Outdated Show resolved Hide resolved
boltrouter/aws_credentials_client.go Outdated Show resolved Hide resolved
@kmushegi kmushegi merged commit ffbba32 into main May 16, 2023
7 checks passed
@kmushegi kmushegi deleted the feat/refresh-aws-credentials-periodically branch May 16, 2023 18:36
This was referenced Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants