[internal/aws/awsutil] Refactor : Migrated from AWS Go SDK v1 to v2 #37910
+240
−191
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.
NOTE : This PR is not yet fully complete. I created it to seek guidance from the moderators regarding the necessary changes.
Description
This PR migrates the
awsutil
folder from AWS SDK v1 to v2. Since theinternal/aws
directory contains several subdirectories that require their own updates, I will be submitting separate PRs for each relevant folder withininternal/aws/*
. This approach follows the contribution guidelines for a easier review process.One significant change in this PR is in the
GetAWSConfig
function. While the arguments passed to the function remain the same, its return value have changed:*aws.Config, *session.Session, error
*aws.Config, aws.Config, error
I’d appreciate any feedback on this change and whether it aligns with the expected design.
Link to tracking issue
Fixes #37728 and #36699
Testing
I used the
go test -v
command to run tests in theinternal/aws/awsutil
directory. Currently, I have commented out 4 out of 8 test functions due to failures, and I have included comments in the code explaining the reasons for each. I would appreciate guidance on resolving these issues.