Migrate SSM client to AWS SDK Go V2#4549
Merged
mye956 merged 1 commit intoaws:feature/migrate-ssm-v2from Apr 9, 2025
Merged
Conversation
863e737 to
0efe75b
Compare
sparrc
previously approved these changes
Apr 1, 2025
TheanLim
previously approved these changes
Apr 2, 2025
conusming SSM client changes fix unit tests removing commented out code
sparrc
approved these changes
Apr 8, 2025
TheanLim
approved these changes
Apr 8, 2025
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.
Summary
This PR will migrate over the SSM client implementation and corresponding code that consumes it over to AWS SDK Go V2.
Implementation details
NewSSMClientofagent/ssm/factory/factory.go:ssm.NewFromConfigfrom AWS SDK Go V2Configfromgithub.com/aws/aws-sdk-go-v2/configin favor ofSessionfromgithub.com/aws/aws-sdk-go/aws/sessioninNewSSMClienterrorin the case thatLoadDefaultConfigfails*Updated all calls of
NewSSMClientto reflect the changes mentioned beforeGetParametersinagent/ssm/interface.goto use the same one as in AWS SDK Go V2 -> https://github.com/aws/aws-sdk-go-v2/blob/64a2f067f475f9bb2129e792a9bc62bf658f9da2/service/ssm/api_op_GetParameters.go#L18-L31GetParametersto reflect changes mentioned beforeGetParametersInputandGetParametersOutputto now use non-pointers for some of their struct fields as part of AWS SDK Go V2 migrationaws-sdk-go/awstoaws-sdk-go-v2/awsTesting
Manual testing:
FIPS testing
FIPs on agent prior to SSM V2 migration
FIPS after SSM V2
New tests cover the changes: yes
Description for the changelog
Enhancement - Migrate SSM client to AWS SDK Go V2
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
Does this PR include the addition of new environment variables in the README?
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.