Skip to content

Import of AWS.Tools.Common makes unexpected TCP connections causing extreme slowdown in some situations #410

@boernsen-development

Description

@boernsen-development

Describe the bug

When I import AWS.Tools.Common, it seems to make a few TCP connections without notice, no matter whether they succeed or not. In some situations where the (cloud-)network doesn't allow these connections, they may timeout causing the import to take much longer than actually required (over 20 seconds im my case). This is hard to debug as there is no information about it.

Possible workaround: Add firewall rules actively blocking these connections. However, this required exact knowledge about all the IPs contacted.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

  • No unexpected connections are made
  • they are at least well documented
  • they are printed by verbose/debug output

Current Behavior

  • Connections are made in background without notice
  • there is neither documentation
  • nor any related verbose/debug output

Reproduction Steps

Open Windows' Resource Monitor while executing the following command in a PowerShell Core console:

Import-Module -Name AWS.Tools.Common

Observe the connections.

When importing other modules, there are no are way less connections.

Possible Solution

Some options:

  • Remove connections completely
  • Make them optional by a switch
  • Document which connections are made and output them via verbose/debug output

Additional Information/Context

No response

AWS Tools for PowerShell version used

AWS.Tools.Common 5.0.147

PowerShell version used

Name Value


PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Operating System and version

Windows Server 2022 Datacenter

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions