clear-skies-aws 2.0.13__py3-none-any.whl → 2.0.14__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clear-skies-aws
3
- Version: 2.0.13
3
+ Version: 2.0.14
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
@@ -55,12 +55,12 @@ clearskies_aws/mocks/actions/step_function.py,sha256=ENEVy8Ai3vPymbQre5aWa5z2McB
55
55
  clearskies_aws/models/__init__.py,sha256=tAU5cPGRSzSClNVRCBxzwlBq6eZO8fftuI3bG1jEyVQ,87
56
56
  clearskies_aws/models/web_socket_connection_model.py,sha256=5M1qfQHKuWMYPUDkwT48QPo2ROey7koizvWLfapsfow,7492
57
57
  clearskies_aws/secrets/__init__.py,sha256=5QWfe6IyHdAyfOJVZJ52qM5hTkw1siMJ6q6YW95-Jl8,345
58
- clearskies_aws/secrets/parameter_store.py,sha256=abeG72LdOdx1WxZpjph2b3T9E7ClXqAYqQ9mxoHI2VQ,6565
58
+ clearskies_aws/secrets/parameter_store.py,sha256=qMvjSjZ8VJ5piKm7mhLua8w9vHcm9SXcjF6_spbmF_I,7403
59
59
  clearskies_aws/secrets/secrets.py,sha256=P30Yx0pkxjPnwCNw8ixoUu--4B7EEsg6gpOlazrk4Oc,956
60
60
  clearskies_aws/secrets/secrets_manager.py,sha256=VhqKw4W65y3RRoFt9Ws5g7Q8nv2ACqkDYwxwgRpU-sk,7026
61
61
  clearskies_aws/secrets/cache_storage/__init__.py,sha256=A6_rUn95NQjJu_VDDNQ1mDDNye18QYGGhXM66orGnb8,255
62
- clearskies_aws/secrets/cache_storage/parameter_store_cache.py,sha256=k2FVmFepZgssvsGuiAj0t3M56K5ZIVqmsRfTLlQFDWk,4028
63
- clear_skies_aws-2.0.13.dist-info/METADATA,sha256=JOWiWVeM4tWzx2NeijR9B9Ihv3Zakh5BvrewvhyzpEU,9077
64
- clear_skies_aws-2.0.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
65
- clear_skies_aws-2.0.13.dist-info/licenses/LICENSE,sha256=MkEX8JF8kZxdyBpTTcB0YTd-xZpWnHvbRlw-pQh8u58,1069
66
- clear_skies_aws-2.0.13.dist-info/RECORD,,
62
+ clearskies_aws/secrets/cache_storage/parameter_store_cache.py,sha256=KXGZ5ITni0HunoQhGLK4puvsTxhiwXccnS8RORjwSIw,4036
63
+ clear_skies_aws-2.0.14.dist-info/METADATA,sha256=6NEtQp_GRMx4EP4en6ovZbdGQC5uGdAZn-8gQwPdHUI,9077
64
+ clear_skies_aws-2.0.14.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
65
+ clear_skies_aws-2.0.14.dist-info/licenses/LICENSE,sha256=MkEX8JF8kZxdyBpTTcB0YTd-xZpWnHvbRlw-pQh8u58,1069
66
+ clear_skies_aws-2.0.14.dist-info/RECORD,,
@@ -55,7 +55,7 @@ class ParameterStoreCache(SecretCache):
55
55
  allow_cleanup = Boolean(default=False)
56
56
 
57
57
  @parameters_to_properties
58
- def __init__(self, prefix: str | None = None, allow_cleanup: bool = False):
58
+ def __init__(self, prefix: str | None = None, allow_cleanup: bool = False) -> None:
59
59
  """
60
60
  Initialize the Parameter Store cache.
61
61
 
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import re
4
4
  from typing import Any
5
5
 
6
+ from botocore.config import Config
6
7
  from botocore.exceptions import ClientError
7
8
  from clearskies.exceptions.not_found import NotFound
8
9
  from types_boto3_ssm import SSMClient
@@ -22,6 +23,9 @@ class ParameterStore(secrets.Secrets[SSMClient]):
22
23
  AWS SSM parameter paths only allow: a-z, A-Z, 0-9, -, _, ., /, @, and :
23
24
  Any disallowed characters in the path are replaced with hyphens.
24
25
 
26
+ The client is configured with adaptive retry mode which automatically handles
27
+ throttling exceptions with exponential backoff (up to 10 retries).
28
+
25
29
  ### Example Usage
26
30
 
27
31
  ```python
@@ -61,12 +65,25 @@ class ParameterStore(secrets.Secrets[SSMClient]):
61
65
  Return the boto3 SSM client.
62
66
 
63
67
  Creates a new client if one doesn't exist yet, using the AWS_REGION environment variable.
68
+ Configured with adaptive retry mode for better throttling handling.
64
69
  """
65
70
  if hasattr(self, "ssm"):
66
71
  return self.ssm
72
+
73
+ # Configure adaptive retry mode with increased max attempts for throttling
74
+ # Adaptive mode automatically adjusts retry behavior based on error responses
75
+ # and includes exponential backoff with jitter
76
+ retry_config = Config(
77
+ retries={
78
+ "max_attempts": 10,
79
+ "mode": "adaptive",
80
+ }
81
+ )
82
+
67
83
  self.ssm = self.boto3.client(
68
84
  "ssm",
69
85
  region_name=self.environment.get("AWS_REGION"),
86
+ config=retry_config,
70
87
  )
71
88
  return self.ssm
72
89
 
@@ -84,6 +101,9 @@ class ParameterStore(secrets.Secrets[SSMClient]):
84
101
 
85
102
  Returns the decrypted parameter value for the given path. If silent_if_not_found
86
103
  is True, returns None when the parameter is not found instead of raising NotFound.
104
+
105
+ Throttling is handled automatically by boto3's adaptive retry mode configured
106
+ on the client (up to 10 retries with exponential backoff and jitter).
87
107
  """
88
108
  sanitized_path = self._sanitize_path(path)
89
109
  try: