Skip to content

Commit df2f6d0

Browse files
amogh09xxx0624
authored andcommitted
Enable dual stack endpoint usage on ECS Client if needed (aws#4652)
1 parent 3ffefbb commit df2f6d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/app/agent.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ func (agent *ecsAgent) start() int {
332332

333333
// Exclusion of IPv6 port bindings is controlled by configuration for historical reasons.
334334
ecsclient.WithIPv6PortBindingExcluded(agent.cfg.ShouldExcludeIPv6PortBinding.Enabled()),
335+
336+
// If instance is IPv6-only then we must use dualstack ECS endpoints
337+
ecsclient.WithDualStackEnabled(agent.cfg.InstanceIPCompatibility.IsIPv6Only()),
335338
}
336339

337340
clientFactory := ecsclient.NewECSClientFactory(agent.credentialsCache, cfgAccessor, agent.ec2MetadataClient,

0 commit comments

Comments
 (0)