clear-skies-aws 2.0.6__py3-none-any.whl → 2.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clear_skies_aws-2.0.6.dist-info → clear_skies_aws-2.0.8.dist-info}/METADATA +1 -1
- {clear_skies_aws-2.0.6.dist-info → clear_skies_aws-2.0.8.dist-info}/RECORD +5 -5
- clearskies_aws/cursors/port_forwarding/ssm.py +9 -3
- {clear_skies_aws-2.0.6.dist-info → clear_skies_aws-2.0.8.dist-info}/WHEEL +0 -0
- {clear_skies_aws-2.0.6.dist-info → clear_skies_aws-2.0.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clear-skies-aws
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: clearskies bindings for working in AWS
|
|
5
5
|
Project-URL: Repository, https://github.com/clearskies-py/clearskies-aws
|
|
6
6
|
Project-URL: Issues, https://github.com/clearskies-py/clearskies-aws/issues
|
|
@@ -25,7 +25,7 @@ clearskies_aws/cursors/__init__.py,sha256=vy-WYxNEy5nd9fqY0En3T6WhE3omoV1tE-A5Uz
|
|
|
25
25
|
clearskies_aws/cursors/iam/__init__.py,sha256=dY410gfPoMXB42jhmamqD5IiCeopDnxr5wIibpqaYcY,127
|
|
26
26
|
clearskies_aws/cursors/iam/rds_mysql.py,sha256=bdAYTLg9t8DsoSi0otY9bmIgLCbrezczxd_3hWuEkeE,5639
|
|
27
27
|
clearskies_aws/cursors/port_forwarding/__init__.py,sha256=LBcFYeIIfmGhxf3Ezn1KChOUdkpF5AjJL1xE_ak-x3s,78
|
|
28
|
-
clearskies_aws/cursors/port_forwarding/ssm.py,sha256=
|
|
28
|
+
clearskies_aws/cursors/port_forwarding/ssm.py,sha256=2tEznKflMG5a8g1AzHWghHkMp4BdBFhewB8WigFR5F4,4878
|
|
29
29
|
clearskies_aws/di/__init__.py,sha256=pLHSIKxS1oELOgttRuwM0yXdJRxjZKXQ6tPxme2db0U,222
|
|
30
30
|
clearskies_aws/di/aws_additional_config_auto_import.py,sha256=94h_YsPBcdwMhqn0VAAfId1jLL5vCsk76kUrr-6ET_U,1275
|
|
31
31
|
clearskies_aws/di/inject/__init__.py,sha256=5_x5_BBQwC6J4k5YLdTm1DfIDM-95zXz1L5a1nMrlrY,186
|
|
@@ -62,7 +62,7 @@ clearskies_aws/secrets/additional_configs/iam_db_auth.py,sha256=PwyiLaacpRfhBKzQ
|
|
|
62
62
|
clearskies_aws/secrets/additional_configs/iam_db_auth_with_ssm.py,sha256=ABY29X-YvrE6vvNo6kVdf4DqyRNq5cFR5SfK7MNkltE,3463
|
|
63
63
|
clearskies_aws/secrets/additional_configs/mysql_connection_dynamic_producer_via_ssh_cert_bastion.py,sha256=mLaplwvJLSbGh6oXgdOKL9Mv-6hLv5OUYCfEwHbHvLE,3700
|
|
64
64
|
clearskies_aws/secrets/additional_configs/mysql_connection_dynamic_producer_via_ssm_bastion.py,sha256=2VHOwto4I9gBwrpd2HGpL-Wr0T2S-jFjUhe2Ib8hNJ8,6596
|
|
65
|
-
clear_skies_aws-2.0.
|
|
66
|
-
clear_skies_aws-2.0.
|
|
67
|
-
clear_skies_aws-2.0.
|
|
68
|
-
clear_skies_aws-2.0.
|
|
65
|
+
clear_skies_aws-2.0.8.dist-info/METADATA,sha256=-uvSoeZ2V4_osTaUEJntwkkKhah6LP_a78xA2ZEioW4,9084
|
|
66
|
+
clear_skies_aws-2.0.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
67
|
+
clear_skies_aws-2.0.8.dist-info/licenses/LICENSE,sha256=MkEX8JF8kZxdyBpTTcB0YTd-xZpWnHvbRlw-pQh8u58,1069
|
|
68
|
+
clear_skies_aws-2.0.8.dist-info/RECORD,,
|
|
@@ -92,6 +92,9 @@ class Ssm(PortForwarder):
|
|
|
92
92
|
if self.local_port == 0:
|
|
93
93
|
self.local_port = self.pick_free_port("127.0.0.1")
|
|
94
94
|
|
|
95
|
+
if self.remote_port is None:
|
|
96
|
+
raise ValueError("remote_port must be set for SSM port forwarding.")
|
|
97
|
+
|
|
95
98
|
if self.is_port_open("127.0.0.1", self.local_port):
|
|
96
99
|
return "127.0.0.1", self.local_port
|
|
97
100
|
|
|
@@ -102,15 +105,17 @@ class Ssm(PortForwarder):
|
|
|
102
105
|
"--target",
|
|
103
106
|
self.instance_id,
|
|
104
107
|
"--document-name",
|
|
105
|
-
"AWS-
|
|
108
|
+
"AWS-StartPortForwardingSessionToRemoteHost",
|
|
106
109
|
"--parameters",
|
|
107
|
-
f"portNumber
|
|
110
|
+
f'{{"host":["{original_host}"],"portNumber":["{self.remote_port}"],"localPortNumber":["{self.local_port}"]}}',
|
|
108
111
|
]
|
|
109
112
|
if self.region:
|
|
110
113
|
ssm_cmd += ["--region", self.region]
|
|
111
114
|
if self.profile:
|
|
112
115
|
ssm_cmd += ["--profile", self.profile]
|
|
113
116
|
|
|
117
|
+
self.logger.debug(f"Starting SSM port forwarding session: {' '.join(ssm_cmd)}")
|
|
118
|
+
|
|
114
119
|
self._proc = self.subprocess.Popen(ssm_cmd, stdout=self.subprocess.PIPE, stderr=self.subprocess.PIPE)
|
|
115
120
|
|
|
116
121
|
start = time.time()
|
|
@@ -123,7 +128,8 @@ class Ssm(PortForwarder):
|
|
|
123
128
|
break
|
|
124
129
|
except Exception:
|
|
125
130
|
if self._proc is not None and self._proc.poll() is not None:
|
|
126
|
-
|
|
131
|
+
stderr = self._proc.stderr.read().decode() if self._proc.stderr else ""
|
|
132
|
+
raise RuntimeError(f"SSM process exited unexpectedly. Stderr: {stderr}")
|
|
127
133
|
if time.time() - start > 10:
|
|
128
134
|
raise TimeoutError(f"Timeout waiting for port {self.local_port} to open")
|
|
129
135
|
time.sleep(0.1)
|
|
File without changes
|
|
File without changes
|