Merged
Conversation
ggreer
approved these changes
Apr 8, 2025
| } | ||
|
|
||
| accessKeyLastUsedDates := make([]time.Time, 0, len(accessKeyIDs)) | ||
| for _, accessKeyId := range accessKeyIDs { |
Contributor
There was a problem hiding this comment.
This seems like it'd slow down syncing quite a bit for accounts with lots of users (or lots of access keys).
If it becomes a problem, we can add a config option to skip this. But until then I don't think it's worth adding yet another config option.
| AccessKeyId: awsSdk.String(accessKeyId), | ||
| }) | ||
| if err != nil { | ||
| logger.Error("Error getting access key last used", zap.String("access_key_id", accessKeyId), zap.Error(err)) |
Contributor
There was a problem hiding this comment.
If there's an error, maybe we should continue or break so we can fall back to the password last used time?
I guess optimal behavior is: If it's a permission error, break. If it's a rate limit error, retry. If it's any other error, continue.
|
|
||
| res, err := client.ListAccessKeys(ctx, &iam.ListAccessKeysInput{UserName: user.UserName}) | ||
| if err != nil { | ||
| logger.Error("Error listing access keys", zap.Error(err)) |
Contributor
There was a problem hiding this comment.
If there's an error listing access keys, should we fall back to using the password last used time instead of returning nil?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.