Enable IPv6 support for SSM Client#4623
Merged
Merged
Conversation
sparrc
approved these changes
May 16, 2025
danehlim
reviewed
May 16, 2025
| assert.NotNil(t, fv.asmClientCreator) | ||
| assert.NotNil(t, fv.fsxClientCreator) | ||
| assert.NotNil(t, fv.statusToTransitions) | ||
| assert.NotNil(t, fv.ipCompatibility) |
Contributor
There was a problem hiding this comment.
nit (non-blocking): Could do a more specific check using assert.Equal here, given that config (or testConfig in this case) contains what we expect to be the source of truth for IP compatibility.
Contributor
Author
There was a problem hiding this comment.
Agreed. Ignoring this for now as we implicitly check it in the ssmClientCreator.NewSSMClient input args
fv, _, ssmClientCreator, _, _, mockSSMClient, _, _ := setup(t)
...
ssmClientCreator.EXPECT().NewSSMClient(gomock.Any(), gomock.Any(), testConfig.InstanceIPCompatibility).Return(mockSSMClient, nil),
Thanks
danehlim
approved these changes
May 16, 2025
Merged
timj-hh
pushed a commit
to timj-hh/amazon-ecs-agent
that referenced
this pull request
Jul 19, 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
Enable SSM client to automatically use dualstack endpoints when running on IPv6-only instances.
Ref PR: #4580
Implementation details
i. Modified
NewSSMClientto acceptIPCompatibilityparameterii. Set
useDualStackEndpointbased on IPv6 compatibility statusTaskResourcessuch asFSxWindowsFileServer,SSMSecret, andCredentialSpecs.ipCompatibilityfield to each task resource.New*constructors to accept an additionalipCompatibilityparameter.New*is invoked when there's a new incoming task that requires task resources.Initialize()is invoked when Agent restarts and reinitialize task resources. Updated such that theipCompatibilityfield is populated.Config.InstanceIPCompatibilityis the source of value. Updated call chains so that theipCompatibilityis passed down correctlyTesting
Setups done:
Executed functional test suite on dualstack subnet. Verified all tests passed and pre-prod endpoint usage through docker container logs.
New tests cover the changes: no
Description for the changelog
Enhancement: SSM Client resolves to dualstack endpoint on IPV6-only instances
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.