Skip to content

Replace ssm endpoint resolution logic with UseDualStackEndpoint - #4931

Merged
TheanLim merged 1 commit into
aws:devfrom
TheanLim:ssmUseDualStack
Apr 17, 2026
Merged

TheanLim merged 1 commit into
aws:devfrom
TheanLim:ssmUseDualStack

Conversation

@TheanLim

@TheanLim TheanLim commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace per-service dualstack endpoint resolution with aws-ssm-agent's built-in UseDualStackEndpoint config flag for IPv6-only ECS Exec support.

Implementation details

  • Set UseDualStackEndpoint in the SSM agent config based on IPv6-only detection.
    • All service clients (Mgs, Mds, S3, Kms, Ssm, Cloudwatch) follow the same pattern: auto-resolve via aws-ssm-agent's endpointImpl.GetServiceEndpoint() (endpoint), then override only if the config's Endpoint field is non-empty. With dual-stack enabled, the auto-resolved values match the previous per-service dualstack endpoint resolution.
  • Removed zero-value fields (Mgs.Region, Mgs.Endpoint, Agent.Region, Agent.OrchestrationRootDir) β€” empty strings already trigger auto-resolution.
  • Kept StopTimeoutMillis (20000) for visibility even though it matches the default.
  • Cleaned up dead codes in endpoints package
  • Cleaned up dead endpoint_suffix code in ecs-anywhere-install.sh.

Testing

  • Updated existing tests (TestFormatSSMAgentConfig, TestGetExecAgentConfigFileName) to match the new SSM Agent config template.
  • Ran ECS Exec related functional tests on IPv4 and IPv6Only environments. This was done on ECS on EC2 (al2023) and ECS Anywhere (ubuntu24-amd64)

New tests cover the changes: no

Description for the changelog

Enhancement - Replace SSM Dualstack endpoint resolution logic with UseDualStackEndpoint

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.

@TheanLim
TheanLim requested a review from a team as a code owner April 14, 2026 22:00
@TheanLim TheanLim changed the title [WIP] Replace ssm endpoint resolution logic with UseDualStackEndpoint Replace ssm endpoint resolution logic with UseDualStackEndpoint Apr 16, 2026
mye956
mye956 previously approved these changes Apr 16, 2026
@amogh09

amogh09 commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Does endpoints package have any dead code now? Can we remove that?

@TheanLim
TheanLim merged commit f72c568 into aws:dev Apr 17, 2026
44 of 45 checks passed
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.

4 participants