localstack-core 4.7.1.dev49__py3-none-any.whl → 4.10.1.dev12__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.
Files changed (253) hide show
  1. localstack/aws/api/cloudformation/__init__.py +18 -4
  2. localstack/aws/api/cloudwatch/__init__.py +41 -1
  3. localstack/aws/api/config/__init__.py +4 -0
  4. localstack/aws/api/core.py +6 -2
  5. localstack/aws/api/dynamodb/__init__.py +30 -0
  6. localstack/aws/api/ec2/__init__.py +1522 -65
  7. localstack/aws/api/iam/__init__.py +7 -0
  8. localstack/aws/api/kinesis/__init__.py +19 -0
  9. localstack/aws/api/kms/__init__.py +6 -0
  10. localstack/aws/api/lambda_/__init__.py +13 -0
  11. localstack/aws/api/logs/__init__.py +15 -0
  12. localstack/aws/api/redshift/__init__.py +9 -3
  13. localstack/aws/api/route53/__init__.py +5 -0
  14. localstack/aws/api/s3/__init__.py +12 -0
  15. localstack/aws/api/s3control/__init__.py +54 -0
  16. localstack/aws/api/ssm/__init__.py +2 -0
  17. localstack/aws/api/transcribe/__init__.py +17 -0
  18. localstack/aws/client.py +7 -2
  19. localstack/aws/forwarder.py +52 -5
  20. localstack/aws/handlers/analytics.py +1 -1
  21. localstack/aws/handlers/internal_requests.py +6 -1
  22. localstack/aws/handlers/logging.py +12 -2
  23. localstack/aws/handlers/metric_handler.py +41 -1
  24. localstack/aws/handlers/service.py +40 -20
  25. localstack/aws/mocking.py +2 -2
  26. localstack/aws/patches.py +2 -2
  27. localstack/aws/protocol/parser.py +459 -32
  28. localstack/aws/protocol/serializer.py +689 -69
  29. localstack/aws/protocol/service_router.py +120 -20
  30. localstack/aws/protocol/validate.py +1 -1
  31. localstack/aws/scaffold.py +1 -1
  32. localstack/aws/skeleton.py +4 -2
  33. localstack/aws/spec-patches.json +58 -0
  34. localstack/aws/spec.py +37 -16
  35. localstack/cli/exceptions.py +1 -1
  36. localstack/cli/localstack.py +6 -6
  37. localstack/cli/lpm.py +3 -4
  38. localstack/cli/plugins.py +1 -1
  39. localstack/cli/profiles.py +1 -2
  40. localstack/config.py +25 -18
  41. localstack/constants.py +4 -29
  42. localstack/dev/kubernetes/__main__.py +130 -7
  43. localstack/dev/run/configurators.py +1 -4
  44. localstack/dev/run/paths.py +1 -1
  45. localstack/dns/plugins.py +5 -1
  46. localstack/dns/server.py +13 -4
  47. localstack/logging/format.py +3 -3
  48. localstack/packages/api.py +9 -8
  49. localstack/packages/core.py +2 -2
  50. localstack/packages/plugins.py +0 -8
  51. localstack/runtime/analytics.py +3 -0
  52. localstack/runtime/hooks.py +1 -1
  53. localstack/runtime/init.py +2 -2
  54. localstack/runtime/main.py +5 -5
  55. localstack/runtime/patches.py +2 -2
  56. localstack/services/apigateway/helpers.py +1 -4
  57. localstack/services/apigateway/legacy/helpers.py +7 -8
  58. localstack/services/apigateway/legacy/integration.py +4 -3
  59. localstack/services/apigateway/legacy/invocations.py +6 -5
  60. localstack/services/apigateway/legacy/provider.py +148 -68
  61. localstack/services/apigateway/legacy/templates.py +1 -1
  62. localstack/services/apigateway/next_gen/execute_api/handlers/method_request.py +7 -2
  63. localstack/services/apigateway/next_gen/execute_api/handlers/resource_router.py +1 -2
  64. localstack/services/apigateway/next_gen/execute_api/integrations/aws.py +3 -0
  65. localstack/services/apigateway/next_gen/execute_api/integrations/http.py +3 -3
  66. localstack/services/apigateway/next_gen/execute_api/template_mapping.py +2 -2
  67. localstack/services/apigateway/next_gen/execute_api/test_invoke.py +114 -9
  68. localstack/services/apigateway/next_gen/provider.py +5 -0
  69. localstack/services/apigateway/resource_providers/aws_apigateway_resource.py +1 -1
  70. localstack/services/cloudformation/api_utils.py +4 -8
  71. localstack/services/cloudformation/cfn_utils.py +1 -1
  72. localstack/services/cloudformation/engine/entities.py +14 -4
  73. localstack/services/cloudformation/engine/template_deployer.py +6 -4
  74. localstack/services/cloudformation/engine/transformers.py +6 -4
  75. localstack/services/cloudformation/engine/v2/change_set_model.py +201 -13
  76. localstack/services/cloudformation/engine/v2/change_set_model_describer.py +52 -3
  77. localstack/services/cloudformation/engine/v2/change_set_model_executor.py +117 -76
  78. localstack/services/cloudformation/engine/v2/change_set_model_preproc.py +205 -52
  79. localstack/services/cloudformation/engine/v2/change_set_model_transform.py +350 -116
  80. localstack/services/cloudformation/engine/v2/change_set_model_validator.py +56 -14
  81. localstack/services/cloudformation/engine/v2/change_set_model_visitor.py +1 -0
  82. localstack/services/cloudformation/engine/v2/resolving.py +7 -5
  83. localstack/services/cloudformation/engine/yaml_parser.py +9 -2
  84. localstack/services/cloudformation/provider.py +7 -5
  85. localstack/services/cloudformation/resource_provider.py +7 -1
  86. localstack/services/cloudformation/resources.py +24149 -0
  87. localstack/services/cloudformation/service_models.py +2 -2
  88. localstack/services/cloudformation/v2/entities.py +19 -9
  89. localstack/services/cloudformation/v2/provider.py +336 -106
  90. localstack/services/cloudformation/v2/types.py +13 -7
  91. localstack/services/cloudformation/v2/utils.py +4 -1
  92. localstack/services/cloudwatch/alarm_scheduler.py +4 -1
  93. localstack/services/cloudwatch/provider.py +18 -13
  94. localstack/services/cloudwatch/provider_v2.py +25 -28
  95. localstack/services/dynamodb/packages.py +2 -1
  96. localstack/services/dynamodb/provider.py +42 -0
  97. localstack/services/dynamodb/server.py +2 -2
  98. localstack/services/dynamodb/v2/provider.py +42 -0
  99. localstack/services/ecr/resource_providers/aws_ecr_repository.py +5 -2
  100. localstack/services/edge.py +1 -1
  101. localstack/services/es/provider.py +2 -2
  102. localstack/services/events/event_rule_engine.py +31 -13
  103. localstack/services/events/models.py +4 -5
  104. localstack/services/events/provider.py +17 -14
  105. localstack/services/events/target.py +17 -9
  106. localstack/services/events/v1/provider.py +5 -5
  107. localstack/services/firehose/provider.py +14 -4
  108. localstack/services/iam/provider.py +11 -116
  109. localstack/services/iam/resources/policy_simulator.py +133 -0
  110. localstack/services/kinesis/models.py +15 -2
  111. localstack/services/kinesis/provider.py +86 -3
  112. localstack/services/kms/provider.py +14 -5
  113. localstack/services/lambda_/api_utils.py +6 -3
  114. localstack/services/lambda_/invocation/docker_runtime_executor.py +1 -1
  115. localstack/services/lambda_/invocation/event_manager.py +1 -1
  116. localstack/services/lambda_/invocation/internal_sqs_queue.py +5 -9
  117. localstack/services/lambda_/invocation/lambda_models.py +10 -7
  118. localstack/services/lambda_/invocation/lambda_service.py +5 -1
  119. localstack/services/lambda_/packages.py +1 -1
  120. localstack/services/lambda_/provider.py +4 -3
  121. localstack/services/lambda_/provider_utils.py +1 -1
  122. localstack/services/logs/provider.py +36 -19
  123. localstack/services/moto.py +2 -1
  124. localstack/services/opensearch/cluster.py +15 -7
  125. localstack/services/opensearch/packages.py +26 -7
  126. localstack/services/opensearch/provider.py +8 -2
  127. localstack/services/opensearch/versions.py +56 -7
  128. localstack/services/plugins.py +11 -7
  129. localstack/services/providers.py +10 -2
  130. localstack/services/redshift/provider.py +0 -21
  131. localstack/services/s3/constants.py +5 -2
  132. localstack/services/s3/cors.py +4 -4
  133. localstack/services/s3/models.py +1 -1
  134. localstack/services/s3/notifications.py +55 -39
  135. localstack/services/s3/presigned_url.py +35 -54
  136. localstack/services/s3/provider.py +73 -15
  137. localstack/services/s3/utils.py +42 -22
  138. localstack/services/s3/validation.py +46 -32
  139. localstack/services/s3/website_hosting.py +4 -2
  140. localstack/services/ses/provider.py +18 -8
  141. localstack/services/sns/constants.py +7 -1
  142. localstack/services/sns/executor.py +9 -2
  143. localstack/services/sns/provider.py +8 -5
  144. localstack/services/sns/publisher.py +31 -16
  145. localstack/services/sns/v2/models.py +167 -0
  146. localstack/services/sns/v2/provider.py +867 -0
  147. localstack/services/sns/v2/utils.py +130 -0
  148. localstack/services/sqs/constants.py +1 -1
  149. localstack/services/sqs/developer_api.py +205 -0
  150. localstack/services/sqs/models.py +48 -5
  151. localstack/services/sqs/provider.py +38 -311
  152. localstack/services/sqs/query_api.py +6 -2
  153. localstack/services/sqs/utils.py +121 -2
  154. localstack/services/ssm/provider.py +1 -1
  155. localstack/services/stepfunctions/asl/component/intrinsic/member.py +1 -1
  156. localstack/services/stepfunctions/asl/component/state/state_choice/comparison/comparison.py +5 -11
  157. localstack/services/stepfunctions/asl/component/state/state_choice/state_choice.py +2 -2
  158. localstack/services/stepfunctions/asl/component/state/state_execution/state_map/state_map.py +2 -2
  159. localstack/services/stepfunctions/asl/component/state/state_execution/state_parallel/state_parallel.py +1 -1
  160. localstack/services/stepfunctions/asl/component/state/state_execution/state_task/state_task.py +2 -2
  161. localstack/services/stepfunctions/asl/component/state/state_fail/state_fail.py +1 -1
  162. localstack/services/stepfunctions/asl/component/state/state_pass/state_pass.py +2 -2
  163. localstack/services/stepfunctions/asl/component/state/state_succeed/state_succeed.py +1 -1
  164. localstack/services/stepfunctions/asl/component/state/state_wait/state_wait.py +1 -1
  165. localstack/services/stepfunctions/asl/eval/environment.py +1 -1
  166. localstack/services/stepfunctions/asl/jsonata/jsonata.py +1 -1
  167. localstack/services/stepfunctions/backend/execution.py +2 -1
  168. localstack/services/stores.py +1 -1
  169. localstack/services/transcribe/provider.py +6 -1
  170. localstack/state/codecs.py +61 -0
  171. localstack/state/core.py +11 -5
  172. localstack/state/pickle.py +10 -49
  173. localstack/testing/aws/cloudformation_utils.py +1 -1
  174. localstack/testing/pytest/cloudformation/fixtures.py +3 -3
  175. localstack/testing/pytest/cloudformation/transformers.py +0 -0
  176. localstack/testing/pytest/container.py +4 -5
  177. localstack/testing/pytest/fixtures.py +33 -31
  178. localstack/testing/pytest/in_memory_localstack.py +0 -4
  179. localstack/testing/pytest/marking.py +38 -11
  180. localstack/testing/pytest/stepfunctions/utils.py +4 -3
  181. localstack/testing/pytest/util.py +1 -1
  182. localstack/testing/pytest/validation_tracking.py +1 -2
  183. localstack/testing/snapshots/transformer_utility.py +6 -1
  184. localstack/utils/analytics/events.py +2 -2
  185. localstack/utils/analytics/metadata.py +6 -4
  186. localstack/utils/analytics/metrics/counter.py +8 -15
  187. localstack/utils/analytics/publisher.py +1 -2
  188. localstack/utils/analytics/service_providers.py +19 -0
  189. localstack/utils/analytics/service_request_aggregator.py +2 -2
  190. localstack/utils/archives.py +11 -11
  191. localstack/utils/asyncio.py +2 -2
  192. localstack/utils/aws/arns.py +24 -29
  193. localstack/utils/aws/aws_responses.py +8 -8
  194. localstack/utils/aws/aws_stack.py +2 -3
  195. localstack/utils/aws/dead_letter_queue.py +1 -5
  196. localstack/utils/aws/message_forwarding.py +1 -2
  197. localstack/utils/aws/request_context.py +4 -5
  198. localstack/utils/aws/resources.py +1 -1
  199. localstack/utils/aws/templating.py +1 -1
  200. localstack/utils/batch_policy.py +3 -3
  201. localstack/utils/bootstrap.py +21 -13
  202. localstack/utils/catalog/catalog.py +139 -0
  203. localstack/utils/catalog/catalog_loader.py +119 -0
  204. localstack/utils/catalog/common.py +58 -0
  205. localstack/utils/catalog/plugins.py +28 -0
  206. localstack/utils/cloudwatch/cloudwatch_util.py +5 -5
  207. localstack/utils/collections.py +7 -8
  208. localstack/utils/config_listener.py +1 -1
  209. localstack/utils/container_networking.py +2 -3
  210. localstack/utils/container_utils/container_client.py +135 -136
  211. localstack/utils/container_utils/docker_cmd_client.py +85 -69
  212. localstack/utils/container_utils/docker_sdk_client.py +69 -66
  213. localstack/utils/crypto.py +10 -10
  214. localstack/utils/diagnose.py +3 -4
  215. localstack/utils/docker_utils.py +9 -5
  216. localstack/utils/files.py +33 -13
  217. localstack/utils/functions.py +4 -3
  218. localstack/utils/http.py +11 -11
  219. localstack/utils/json.py +20 -6
  220. localstack/utils/kinesis/kinesis_connector.py +2 -1
  221. localstack/utils/net.py +15 -9
  222. localstack/utils/no_exit_argument_parser.py +2 -2
  223. localstack/utils/numbers.py +9 -2
  224. localstack/utils/objects.py +7 -6
  225. localstack/utils/patch.py +10 -3
  226. localstack/utils/run.py +12 -11
  227. localstack/utils/scheduler.py +11 -11
  228. localstack/utils/server/tcp_proxy.py +2 -2
  229. localstack/utils/serving.py +3 -4
  230. localstack/utils/strings.py +15 -16
  231. localstack/utils/sync.py +126 -1
  232. localstack/utils/tagging.py +8 -6
  233. localstack/utils/testutil.py +8 -8
  234. localstack/utils/threads.py +2 -2
  235. localstack/utils/time.py +12 -4
  236. localstack/utils/urls.py +1 -3
  237. localstack/utils/xray/traceid.py +1 -1
  238. localstack/version.py +16 -3
  239. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/METADATA +18 -14
  240. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/RECORD +248 -239
  241. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/entry_points.txt +8 -4
  242. localstack_core-4.10.1.dev12.dist-info/plux.json +1 -0
  243. localstack/packages/terraform.py +0 -46
  244. localstack/services/cloudformation/deploy.html +0 -144
  245. localstack/services/cloudformation/deploy_ui.py +0 -47
  246. localstack/services/cloudformation/plugins.py +0 -12
  247. localstack_core-4.7.1.dev49.dist-info/plux.json +0 -1
  248. {localstack_core-4.7.1.dev49.data → localstack_core-4.10.1.dev12.data}/scripts/localstack +0 -0
  249. {localstack_core-4.7.1.dev49.data → localstack_core-4.10.1.dev12.data}/scripts/localstack-supervisor +0 -0
  250. {localstack_core-4.7.1.dev49.data → localstack_core-4.10.1.dev12.data}/scripts/localstack.bat +0 -0
  251. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/WHEEL +0 -0
  252. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/licenses/LICENSE.txt +0 -0
  253. {localstack_core-4.7.1.dev49.dist-info → localstack_core-4.10.1.dev12.dist-info}/top_level.txt +0 -0
@@ -276,6 +276,13 @@ class summaryKeyType(StrEnum):
276
276
  PolicyVersionsInUseQuota = "PolicyVersionsInUseQuota"
277
277
  VersionsPerPolicyQuota = "VersionsPerPolicyQuota"
278
278
  GlobalEndpointTokenVersion = "GlobalEndpointTokenVersion"
279
+ AssumeRolePolicySizeQuota = "AssumeRolePolicySizeQuota"
280
+ InstanceProfiles = "InstanceProfiles"
281
+ InstanceProfilesQuota = "InstanceProfilesQuota"
282
+ Providers = "Providers"
283
+ RolePolicySizeQuota = "RolePolicySizeQuota"
284
+ Roles = "Roles"
285
+ RolesQuota = "RolesQuota"
279
286
 
280
287
 
281
288
  class AccountNotManagementOrDelegatedAdministratorException(ServiceException):
@@ -18,6 +18,7 @@ ListShardsInputLimit = int
18
18
  ListStreamConsumersInputLimit = int
19
19
  ListStreamsInputLimit = int
20
20
  ListTagsForStreamInputLimit = int
21
+ MaxRecordSizeInKiB = int
21
22
  NextToken = str
22
23
  OnDemandStreamCountLimitObject = int
23
24
  OnDemandStreamCountObject = int
@@ -241,6 +242,7 @@ class CreateStreamInput(ServiceRequest):
241
242
  ShardCount: Optional[PositiveIntegerObject]
242
243
  StreamModeDetails: Optional[StreamModeDetails]
243
244
  Tags: Optional[TagMap]
245
+ MaxRecordSizeInKiB: Optional[MaxRecordSizeInKiB]
244
246
 
245
247
 
246
248
  Data = bytes
@@ -357,6 +359,7 @@ class StreamDescriptionSummary(TypedDict, total=False):
357
359
  KeyId: Optional[KeyId]
358
360
  OpenShardCount: ShardCountObject
359
361
  ConsumerCount: Optional[ConsumerCountObject]
362
+ MaxRecordSizeInKiB: Optional[MaxRecordSizeInKiB]
360
363
 
361
364
 
362
365
  class DescribeStreamSummaryOutput(TypedDict, total=False):
@@ -666,6 +669,11 @@ class UntagResourceInput(ServiceRequest):
666
669
  ResourceARN: ResourceARN
667
670
 
668
671
 
672
+ class UpdateMaxRecordSizeInput(ServiceRequest):
673
+ StreamARN: Optional[StreamARN]
674
+ MaxRecordSizeInKiB: MaxRecordSizeInKiB
675
+
676
+
669
677
  class UpdateShardCountInput(ServiceRequest):
670
678
  StreamName: Optional[StreamName]
671
679
  TargetShardCount: PositiveIntegerObject
@@ -708,6 +716,7 @@ class KinesisApi:
708
716
  shard_count: PositiveIntegerObject | None = None,
709
717
  stream_mode_details: StreamModeDetails | None = None,
710
718
  tags: TagMap | None = None,
719
+ max_record_size_in_ki_b: MaxRecordSizeInKiB | None = None,
711
720
  **kwargs,
712
721
  ) -> None:
713
722
  raise NotImplementedError
@@ -1032,6 +1041,16 @@ class KinesisApi:
1032
1041
  ) -> None:
1033
1042
  raise NotImplementedError
1034
1043
 
1044
+ @handler("UpdateMaxRecordSize")
1045
+ def update_max_record_size(
1046
+ self,
1047
+ context: RequestContext,
1048
+ max_record_size_in_ki_b: MaxRecordSizeInKiB,
1049
+ stream_arn: StreamARN | None = None,
1050
+ **kwargs,
1051
+ ) -> None:
1052
+ raise NotImplementedError
1053
+
1035
1054
  @handler("UpdateShardCount")
1036
1055
  def update_shard_count(
1037
1056
  self,
@@ -5,6 +5,7 @@ from typing import Dict, List, Optional, TypedDict
5
5
  from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
6
6
 
7
7
  AWSAccountIdType = str
8
+ AccountIdType = str
8
9
  AliasNameType = str
9
10
  ArnType = str
10
11
  BackingKeyIdResponseType = str
@@ -621,6 +622,7 @@ class CreateCustomKeyStoreRequest(ServiceRequest):
621
622
  XksProxyUriEndpoint: Optional[XksProxyUriEndpointType]
622
623
  XksProxyUriPath: Optional[XksProxyUriPathType]
623
624
  XksProxyVpcEndpointServiceName: Optional[XksProxyVpcEndpointServiceNameType]
625
+ XksProxyVpcEndpointServiceOwner: Optional[AccountIdType]
624
626
  XksProxyAuthenticationCredential: Optional[XksProxyAuthenticationCredentialType]
625
627
  XksProxyConnectivity: Optional[XksProxyConnectivityType]
626
628
 
@@ -744,6 +746,7 @@ class XksProxyConfigurationType(TypedDict, total=False):
744
746
  UriEndpoint: Optional[XksProxyUriEndpointType]
745
747
  UriPath: Optional[XksProxyUriPathType]
746
748
  VpcEndpointServiceName: Optional[XksProxyVpcEndpointServiceNameType]
749
+ VpcEndpointServiceOwner: Optional[AccountIdType]
747
750
 
748
751
 
749
752
  class CustomKeyStoresListEntry(TypedDict, total=False):
@@ -1290,6 +1293,7 @@ class UpdateCustomKeyStoreRequest(ServiceRequest):
1290
1293
  XksProxyUriEndpoint: Optional[XksProxyUriEndpointType]
1291
1294
  XksProxyUriPath: Optional[XksProxyUriPathType]
1292
1295
  XksProxyVpcEndpointServiceName: Optional[XksProxyVpcEndpointServiceNameType]
1296
+ XksProxyVpcEndpointServiceOwner: Optional[AccountIdType]
1293
1297
  XksProxyAuthenticationCredential: Optional[XksProxyAuthenticationCredentialType]
1294
1298
  XksProxyConnectivity: Optional[XksProxyConnectivityType]
1295
1299
 
@@ -1373,6 +1377,7 @@ class KmsApi:
1373
1377
  xks_proxy_uri_endpoint: XksProxyUriEndpointType | None = None,
1374
1378
  xks_proxy_uri_path: XksProxyUriPathType | None = None,
1375
1379
  xks_proxy_vpc_endpoint_service_name: XksProxyVpcEndpointServiceNameType | None = None,
1380
+ xks_proxy_vpc_endpoint_service_owner: AccountIdType | None = None,
1376
1381
  xks_proxy_authentication_credential: XksProxyAuthenticationCredentialType | None = None,
1377
1382
  xks_proxy_connectivity: XksProxyConnectivityType | None = None,
1378
1383
  **kwargs,
@@ -1864,6 +1869,7 @@ class KmsApi:
1864
1869
  xks_proxy_uri_endpoint: XksProxyUriEndpointType | None = None,
1865
1870
  xks_proxy_uri_path: XksProxyUriPathType | None = None,
1866
1871
  xks_proxy_vpc_endpoint_service_name: XksProxyVpcEndpointServiceNameType | None = None,
1872
+ xks_proxy_vpc_endpoint_service_owner: AccountIdType | None = None,
1867
1873
  xks_proxy_authentication_credential: XksProxyAuthenticationCredentialType | None = None,
1868
1874
  xks_proxy_connectivity: XksProxyConnectivityType | None = None,
1869
1875
  **kwargs,
@@ -36,6 +36,7 @@ Handler = str
36
36
  Header = str
37
37
  HttpStatus = int
38
38
  Integer = int
39
+ InvokedViaFunctionUrl = bool
39
40
  KMSKeyArn = str
40
41
  LastUpdateStatusReason = str
41
42
  LayerArn = str
@@ -286,6 +287,9 @@ class Runtime(StrEnum):
286
287
  java21 = "java21"
287
288
  python3_13 = "python3.13"
288
289
  nodejs22_x = "nodejs22.x"
290
+ java25 = "java25"
291
+ nodejs24_x = "nodejs24.x"
292
+ python3_14 = "python3.14"
289
293
 
290
294
 
291
295
  class SchemaRegistryEventRecordFormat(StrEnum):
@@ -594,6 +598,13 @@ class ResourceNotReadyException(ServiceException):
594
598
  Type: Optional[String]
595
599
 
596
600
 
601
+ class SerializedRequestEntityTooLargeException(ServiceException):
602
+ code: str = "SerializedRequestEntityTooLargeException"
603
+ sender_fault: bool = True
604
+ status_code: int = 413
605
+ Type: Optional[String]
606
+
607
+
597
608
  class ServiceException(ServiceException):
598
609
  code: str = "ServiceException"
599
610
  sender_fault: bool = False
@@ -691,6 +702,7 @@ class AddPermissionRequest(ServiceRequest):
691
702
  RevisionId: Optional[String]
692
703
  PrincipalOrgID: Optional[PrincipalOrgID]
693
704
  FunctionUrlAuthType: Optional[FunctionUrlAuthType]
705
+ InvokedViaFunctionUrl: Optional[InvokedViaFunctionUrl]
694
706
 
695
707
 
696
708
  class AddPermissionResponse(TypedDict, total=False):
@@ -1903,6 +1915,7 @@ class LambdaApi:
1903
1915
  revision_id: String | None = None,
1904
1916
  principal_org_id: PrincipalOrgID | None = None,
1905
1917
  function_url_auth_type: FunctionUrlAuthType | None = None,
1918
+ invoked_via_function_url: InvokedViaFunctionUrl | None = None,
1906
1919
  **kwargs,
1907
1920
  ) -> AddPermissionResponse:
1908
1921
  raise NotImplementedError
@@ -57,6 +57,7 @@ Field = str
57
57
  FieldDelimiter = str
58
58
  FieldHeader = str
59
59
  FieldIndexName = str
60
+ FieldSelectionCriteria = str
60
61
  FilterCount = int
61
62
  FilterName = str
62
63
  FilterPattern = str
@@ -137,6 +138,7 @@ SplitStringDelimiter = str
137
138
  StartFromHead = bool
138
139
  StatsValue = float
139
140
  Success = bool
141
+ SystemField = str
140
142
  TagKey = str
141
143
  TagValue = str
142
144
  Target = str
@@ -1139,6 +1141,7 @@ class DescribeMetricFiltersRequest(ServiceRequest):
1139
1141
  metricNamespace: Optional[MetricNamespace]
1140
1142
 
1141
1143
 
1144
+ EmitSystemFields = List[SystemField]
1142
1145
  Dimensions = Dict[DimensionsKey, DimensionsValue]
1143
1146
 
1144
1147
 
@@ -1161,6 +1164,8 @@ class MetricFilter(TypedDict, total=False):
1161
1164
  creationTime: Optional[Timestamp]
1162
1165
  logGroupName: Optional[LogGroupName]
1163
1166
  applyOnTransformedLogs: Optional[ApplyOnTransformedLogs]
1167
+ fieldSelectionCriteria: Optional[FieldSelectionCriteria]
1168
+ emitSystemFieldDimensions: Optional[EmitSystemFields]
1164
1169
 
1165
1170
 
1166
1171
  MetricFilters = List[MetricFilter]
@@ -1263,6 +1268,8 @@ class SubscriptionFilter(TypedDict, total=False):
1263
1268
  distribution: Optional[Distribution]
1264
1269
  applyOnTransformedLogs: Optional[ApplyOnTransformedLogs]
1265
1270
  creationTime: Optional[Timestamp]
1271
+ fieldSelectionCriteria: Optional[FieldSelectionCriteria]
1272
+ emitSystemFields: Optional[EmitSystemFields]
1266
1273
 
1267
1274
 
1268
1275
  SubscriptionFilters = List[SubscriptionFilter]
@@ -2032,6 +2039,8 @@ class PutMetricFilterRequest(ServiceRequest):
2032
2039
  filterPattern: FilterPattern
2033
2040
  metricTransformations: MetricTransformations
2034
2041
  applyOnTransformedLogs: Optional[ApplyOnTransformedLogs]
2042
+ fieldSelectionCriteria: Optional[FieldSelectionCriteria]
2043
+ emitSystemFieldDimensions: Optional[EmitSystemFields]
2035
2044
 
2036
2045
 
2037
2046
  class PutQueryDefinitionRequest(ServiceRequest):
@@ -2072,6 +2081,8 @@ class PutSubscriptionFilterRequest(ServiceRequest):
2072
2081
  roleArn: Optional[RoleArn]
2073
2082
  distribution: Optional[Distribution]
2074
2083
  applyOnTransformedLogs: Optional[ApplyOnTransformedLogs]
2084
+ fieldSelectionCriteria: Optional[FieldSelectionCriteria]
2085
+ emitSystemFields: Optional[EmitSystemFields]
2075
2086
 
2076
2087
 
2077
2088
  class PutTransformerRequest(ServiceRequest):
@@ -2929,6 +2940,8 @@ class LogsApi:
2929
2940
  filter_pattern: FilterPattern,
2930
2941
  metric_transformations: MetricTransformations,
2931
2942
  apply_on_transformed_logs: ApplyOnTransformedLogs | None = None,
2943
+ field_selection_criteria: FieldSelectionCriteria | None = None,
2944
+ emit_system_field_dimensions: EmitSystemFields | None = None,
2932
2945
  **kwargs,
2933
2946
  ) -> None:
2934
2947
  raise NotImplementedError
@@ -2980,6 +2993,8 @@ class LogsApi:
2980
2993
  role_arn: RoleArn | None = None,
2981
2994
  distribution: Distribution | None = None,
2982
2995
  apply_on_transformed_logs: ApplyOnTransformedLogs | None = None,
2996
+ field_selection_criteria: FieldSelectionCriteria | None = None,
2997
+ emit_system_fields: EmitSystemFields | None = None,
2983
2998
  **kwargs,
2984
2999
  ) -> None:
2985
3000
  raise NotImplementedError
@@ -1985,6 +1985,9 @@ class CreateIntegrationMessage(ServiceRequest):
1985
1985
  Description: Optional[IntegrationDescription]
1986
1986
 
1987
1987
 
1988
+ TagKeyList = List[String]
1989
+
1990
+
1988
1991
  class ReadWriteAccess(TypedDict, total=False):
1989
1992
  Authorization: ServiceAuthorization
1990
1993
 
@@ -2023,6 +2026,8 @@ class CreateRedshiftIdcApplicationMessage(ServiceRequest):
2023
2026
  IamRoleArn: String
2024
2027
  AuthorizedTokenIssuerList: Optional[AuthorizedTokenIssuerList]
2025
2028
  ServiceIntegrations: Optional[ServiceIntegrationList]
2029
+ Tags: Optional[TagList]
2030
+ SsoTagKeys: Optional[TagKeyList]
2026
2031
 
2027
2032
 
2028
2033
  class RedshiftIdcApplication(TypedDict, total=False):
@@ -2036,6 +2041,8 @@ class RedshiftIdcApplication(TypedDict, total=False):
2036
2041
  IdcOnboardStatus: Optional[String]
2037
2042
  AuthorizedTokenIssuerList: Optional[AuthorizedTokenIssuerList]
2038
2043
  ServiceIntegrations: Optional[ServiceIntegrationList]
2044
+ Tags: Optional[TagList]
2045
+ SsoTagKeys: Optional[TagKeyList]
2039
2046
 
2040
2047
 
2041
2048
  class CreateRedshiftIdcApplicationResult(TypedDict, total=False):
@@ -2247,9 +2254,6 @@ class DeleteSnapshotScheduleMessage(ServiceRequest):
2247
2254
  ScheduleIdentifier: String
2248
2255
 
2249
2256
 
2250
- TagKeyList = List[String]
2251
-
2252
-
2253
2257
  class DeleteTagsMessage(ServiceRequest):
2254
2258
  ResourceName: String
2255
2259
  TagKeys: TagKeyList
@@ -3914,6 +3918,8 @@ class RedshiftApi:
3914
3918
  identity_namespace: IdentityNamespaceString | None = None,
3915
3919
  authorized_token_issuer_list: AuthorizedTokenIssuerList | None = None,
3916
3920
  service_integrations: ServiceIntegrationList | None = None,
3921
+ tags: TagList | None = None,
3922
+ sso_tag_keys: TagKeyList | None = None,
3917
3923
  **kwargs,
3918
3924
  ) -> CreateRedshiftIdcApplicationResult:
3919
3925
  raise NotImplementedError
@@ -166,6 +166,8 @@ class CloudWatchRegion(StrEnum):
166
166
  ap_southeast_7 = "ap-southeast-7"
167
167
  ap_east_2 = "ap-east-2"
168
168
  eu_isoe_west_1 = "eu-isoe-west-1"
169
+ ap_southeast_6 = "ap-southeast-6"
170
+ us_isob_west_1 = "us-isob-west-1"
169
171
 
170
172
 
171
173
  class ComparisonOperator(StrEnum):
@@ -282,6 +284,7 @@ class ResourceRecordSetRegion(StrEnum):
282
284
  us_gov_east_1 = "us-gov-east-1"
283
285
  us_gov_west_1 = "us-gov-west-1"
284
286
  ap_east_2 = "ap-east-2"
287
+ ap_southeast_6 = "ap-southeast-6"
285
288
 
286
289
 
287
290
  class ReusableDelegationSetLimitType(StrEnum):
@@ -345,6 +348,8 @@ class VPCRegion(StrEnum):
345
348
  ap_southeast_7 = "ap-southeast-7"
346
349
  ap_east_2 = "ap-east-2"
347
350
  eu_isoe_west_1 = "eu-isoe-west-1"
351
+ ap_southeast_6 = "ap-southeast-6"
352
+ us_isob_west_1 = "us-isob-west-1"
348
353
 
349
354
 
350
355
  class CidrBlockInUseException(ServiceException):
@@ -1061,6 +1061,14 @@ class BadDigest(ServiceException):
1061
1061
  CalculatedDigest: Optional[ContentMD5]
1062
1062
 
1063
1063
 
1064
+ class AuthorizationHeaderMalformed(ServiceException):
1065
+ code: str = "AuthorizationHeaderMalformed"
1066
+ sender_fault: bool = False
1067
+ status_code: int = 400
1068
+ Region: Optional[BucketRegion]
1069
+ HostId: Optional[HostId]
1070
+
1071
+
1064
1072
  AbortDate = datetime
1065
1073
 
1066
1074
 
@@ -1477,6 +1485,8 @@ class CopyObjectRequest(ServiceRequest):
1477
1485
  GrantRead: Optional[GrantRead]
1478
1486
  GrantReadACP: Optional[GrantReadACP]
1479
1487
  GrantWriteACP: Optional[GrantWriteACP]
1488
+ IfMatch: Optional[IfMatch]
1489
+ IfNoneMatch: Optional[IfNoneMatch]
1480
1490
  Key: ObjectKey
1481
1491
  Metadata: Optional[Metadata]
1482
1492
  MetadataDirective: Optional[MetadataDirective]
@@ -3832,6 +3842,8 @@ class S3Api:
3832
3842
  grant_read: GrantRead | None = None,
3833
3843
  grant_read_acp: GrantReadACP | None = None,
3834
3844
  grant_write_acp: GrantWriteACP | None = None,
3845
+ if_match: IfMatch | None = None,
3846
+ if_none_match: IfNoneMatch | None = None,
3835
3847
  metadata: Metadata | None = None,
3836
3848
  metadata_directive: MetadataDirective | None = None,
3837
3849
  tagging_directive: TaggingDirective | None = None,
@@ -65,6 +65,7 @@ MultiRegionAccessPointClientToken = str
65
65
  MultiRegionAccessPointId = str
66
66
  MultiRegionAccessPointName = str
67
67
  NoSuchPublicAccessBlockConfigurationMessage = str
68
+ NonEmptyKmsKeyArnString = str
68
69
  NonEmptyMaxLength1024String = str
69
70
  NonEmptyMaxLength2048String = str
70
71
  NonEmptyMaxLength256String = str
@@ -147,6 +148,20 @@ class BucketVersioningStatus(StrEnum):
147
148
  Suspended = "Suspended"
148
149
 
149
150
 
151
+ class ComputeObjectChecksumAlgorithm(StrEnum):
152
+ CRC32 = "CRC32"
153
+ CRC32C = "CRC32C"
154
+ CRC64NVME = "CRC64NVME"
155
+ MD5 = "MD5"
156
+ SHA1 = "SHA1"
157
+ SHA256 = "SHA256"
158
+
159
+
160
+ class ComputeObjectChecksumType(StrEnum):
161
+ FULL_OBJECT = "FULL_OBJECT"
162
+ COMPOSITE = "COMPOSITE"
163
+
164
+
150
165
  class DeleteMarkerReplicationStatus(StrEnum):
151
166
  Enabled = "Enabled"
152
167
  Disabled = "Disabled"
@@ -272,6 +287,7 @@ class OperationName(StrEnum):
272
287
  S3PutObjectLegalHold = "S3PutObjectLegalHold"
273
288
  S3PutObjectRetention = "S3PutObjectRetention"
274
289
  S3ReplicateObject = "S3ReplicateObject"
290
+ S3ComputeObjectChecksum = "S3ComputeObjectChecksum"
275
291
 
276
292
 
277
293
  class OutputSchemaVersion(StrEnum):
@@ -887,6 +903,36 @@ class CreateBucketResult(TypedDict, total=False):
887
903
  BucketArn: Optional[S3RegionalBucketArn]
888
904
 
889
905
 
906
+ class NotSSEFilter(TypedDict, total=False):
907
+ pass
908
+
909
+
910
+ class SSECFilter(TypedDict, total=False):
911
+ pass
912
+
913
+
914
+ class DSSEKMSFilter(TypedDict, total=False):
915
+ KmsKeyArn: Optional[NonEmptyKmsKeyArnString]
916
+
917
+
918
+ class SSEKMSFilter(TypedDict, total=False):
919
+ KmsKeyArn: Optional[NonEmptyKmsKeyArnString]
920
+ BucketKeyEnabled: Optional[Boolean]
921
+
922
+
923
+ class SSES3Filter(TypedDict, total=False):
924
+ pass
925
+
926
+
927
+ class ObjectEncryptionFilter(TypedDict, total=False):
928
+ SSES3: Optional[SSES3Filter]
929
+ SSEKMS: Optional[SSEKMSFilter]
930
+ DSSEKMS: Optional[DSSEKMSFilter]
931
+ SSEC: Optional[SSECFilter]
932
+ NOTSSE: Optional[NotSSEFilter]
933
+
934
+
935
+ ObjectEncryptionFilterList = List[ObjectEncryptionFilter]
890
936
  StorageClassList = List[S3StorageClass]
891
937
  ObjectSizeLessThanBytes = int
892
938
  ObjectSizeGreaterThanBytes = int
@@ -912,6 +958,7 @@ class JobManifestGeneratorFilter(TypedDict, total=False):
912
958
  ObjectSizeGreaterThanBytes: Optional[ObjectSizeGreaterThanBytes]
913
959
  ObjectSizeLessThanBytes: Optional[ObjectSizeLessThanBytes]
914
960
  MatchAnyStorageClass: Optional[StorageClassList]
961
+ MatchAnyObjectEncryption: Optional[ObjectEncryptionFilterList]
915
962
 
916
963
 
917
964
  class SSEKMSEncryption(TypedDict, total=False):
@@ -980,6 +1027,12 @@ class JobReport(TypedDict, total=False):
980
1027
  Enabled: Boolean
981
1028
  Prefix: Optional[ReportPrefixString]
982
1029
  ReportScope: Optional[JobReportScope]
1030
+ ExpectedBucketOwner: Optional[AccountId]
1031
+
1032
+
1033
+ class S3ComputeObjectChecksumOperation(TypedDict, total=False):
1034
+ ChecksumAlgorithm: Optional[ComputeObjectChecksumAlgorithm]
1035
+ ChecksumType: Optional[ComputeObjectChecksumType]
983
1036
 
984
1037
 
985
1038
  class S3ReplicateObjectOperation(TypedDict, total=False):
@@ -1111,6 +1164,7 @@ class JobOperation(TypedDict, total=False):
1111
1164
  S3PutObjectLegalHold: Optional[S3SetObjectLegalHoldOperation]
1112
1165
  S3PutObjectRetention: Optional[S3SetObjectRetentionOperation]
1113
1166
  S3ReplicateObject: Optional[S3ReplicateObjectOperation]
1167
+ S3ComputeObjectChecksum: Optional[S3ComputeObjectChecksumOperation]
1114
1168
 
1115
1169
 
1116
1170
  class CreateJobRequest(ServiceRequest):
@@ -4426,6 +4426,7 @@ class GetDeployablePatchSnapshotForInstanceRequest(ServiceRequest):
4426
4426
  InstanceId: InstanceId
4427
4427
  SnapshotId: SnapshotId
4428
4428
  BaselineOverride: Optional[BaselineOverride]
4429
+ UseS3DualStackEndpoint: Optional[Boolean]
4429
4430
 
4430
4431
 
4431
4432
  class GetDeployablePatchSnapshotForInstanceResult(TypedDict, total=False):
@@ -6749,6 +6750,7 @@ class SsmApi:
6749
6750
  instance_id: InstanceId,
6750
6751
  snapshot_id: SnapshotId,
6751
6752
  baseline_override: BaselineOverride | None = None,
6753
+ use_s3_dual_stack_endpoint: Boolean | None = None,
6752
6754
  **kwargs,
6753
6755
  ) -> GetDeployablePatchSnapshotForInstanceResult:
6754
6756
  raise NotImplementedError
@@ -254,6 +254,12 @@ class PiiEntityType(StrEnum):
254
254
  ALL = "ALL"
255
255
 
256
256
 
257
+ class Pronouns(StrEnum):
258
+ HE_HIM = "HE_HIM"
259
+ SHE_HER = "SHE_HER"
260
+ THEY_THEM = "THEY_THEM"
261
+
262
+
257
263
  class RedactionOutput(StrEnum):
258
264
  redacted = "redacted"
259
265
  redacted_and_unredacted = "redacted_and_unredacted"
@@ -736,6 +742,7 @@ class MedicalScribeJob(TypedDict, total=False):
736
742
  Settings: Optional[MedicalScribeSettings]
737
743
  DataAccessRoleArn: Optional[DataAccessRoleArn]
738
744
  ChannelDefinitions: Optional[MedicalScribeChannelDefinitions]
745
+ MedicalScribeContextProvided: Optional[Boolean]
739
746
  Tags: Optional[TagList]
740
747
 
741
748
 
@@ -1097,6 +1104,14 @@ class ListVocabularyFiltersResponse(TypedDict, total=False):
1097
1104
  VocabularyFilters: Optional[VocabularyFilters]
1098
1105
 
1099
1106
 
1107
+ class MedicalScribePatientContext(TypedDict, total=False):
1108
+ Pronouns: Optional[Pronouns]
1109
+
1110
+
1111
+ class MedicalScribeContext(TypedDict, total=False):
1112
+ PatientContext: Optional[MedicalScribePatientContext]
1113
+
1114
+
1100
1115
  class StartCallAnalyticsJobRequest(ServiceRequest):
1101
1116
  CallAnalyticsJobName: CallAnalyticsJobName
1102
1117
  Media: Media
@@ -1122,6 +1137,7 @@ class StartMedicalScribeJobRequest(ServiceRequest):
1122
1137
  Settings: MedicalScribeSettings
1123
1138
  ChannelDefinitions: Optional[MedicalScribeChannelDefinitions]
1124
1139
  Tags: Optional[TagList]
1140
+ MedicalScribeContext: Optional[MedicalScribeContext]
1125
1141
 
1126
1142
 
1127
1143
  class StartMedicalScribeJobResponse(TypedDict, total=False):
@@ -1576,6 +1592,7 @@ class TranscribeApi:
1576
1592
  kms_encryption_context: KMSEncryptionContextMap | None = None,
1577
1593
  channel_definitions: MedicalScribeChannelDefinitions | None = None,
1578
1594
  tags: TagList | None = None,
1595
+ medical_scribe_context: MedicalScribeContext | None = None,
1579
1596
  **kwargs,
1580
1597
  ) -> StartMedicalScribeJobResponse:
1581
1598
  raise NotImplementedError
localstack/aws/client.py CHANGED
@@ -21,6 +21,7 @@ from localstack.utils.strings import to_str
21
21
  from .api import CommonServiceException, RequestContext, ServiceException, ServiceResponse
22
22
  from .connect import get_service_endpoint
23
23
  from .gateway import Gateway
24
+ from .spec import ProtocolName
24
25
 
25
26
  LOG = logging.getLogger(__name__)
26
27
 
@@ -284,13 +285,17 @@ def _patch_botocore_endpoint_in_memory():
284
285
 
285
286
 
286
287
  def parse_response(
287
- operation: OperationModel, response: Response, include_response_metadata: bool = True
288
+ operation: OperationModel,
289
+ protocol: ProtocolName,
290
+ response: Response,
291
+ include_response_metadata: bool = True,
288
292
  ) -> ServiceResponse:
289
293
  """
290
294
  Parses an HTTP Response object into an AWS response object using botocore. It does this by adapting the
291
295
  procedure of ``botocore.endpoint.convert_to_response_dict`` to work with Werkzeug's server-side response object.
292
296
 
293
297
  :param operation: the operation of the original request
298
+ :param protocol: the protocol of the original request
294
299
  :param response: the HTTP response object containing the response of the operation
295
300
  :param include_response_metadata: True if the ResponseMetadata (typical for boto response dicts) should be included
296
301
  :return: a parsed dictionary as it is returned by botocore
@@ -322,7 +327,7 @@ def parse_response(
322
327
  timestamp_parser=_cbor_timestamp_parser, blob_parser=_cbor_blob_parser
323
328
  )
324
329
 
325
- parser = factory.create_parser(operation.service_model.protocol)
330
+ parser = factory.create_parser(protocol)
326
331
  parsed_response = parser.parse(response_dict, operation.output_shape)
327
332
 
328
333
  if response.status_code >= 301:
@@ -8,6 +8,8 @@ from typing import Any
8
8
 
9
9
  from botocore.awsrequest import AWSPreparedRequest, prepare_request_dict
10
10
  from botocore.config import Config as BotoConfig
11
+ from botocore.model import OperationModel
12
+ from botocore.serialize import create_serializer
11
13
  from werkzeug.datastructures import Headers
12
14
 
13
15
  from localstack.aws.api.core import (
@@ -19,7 +21,7 @@ from localstack.aws.api.core import (
19
21
  from localstack.aws.client import create_http_request, parse_response, raise_service_exception
20
22
  from localstack.aws.connect import connect_to
21
23
  from localstack.aws.skeleton import DispatchTable, create_dispatch_table
22
- from localstack.aws.spec import load_service
24
+ from localstack.aws.spec import ProtocolName, load_service
23
25
  from localstack.constants import AWS_REGION_US_EAST_1
24
26
  from localstack.http import Response
25
27
  from localstack.http.proxy import Proxy
@@ -79,7 +81,7 @@ class AwsRequestProxy:
79
81
  if not self.parse_response:
80
82
  return http_response
81
83
  parsed_response = parse_response(
82
- context.operation, http_response, self.include_response_metadata
84
+ context.operation, context.protocol, http_response, self.include_response_metadata
83
85
  )
84
86
  raise_service_exception(http_response, parsed_response)
85
87
  return parsed_response
@@ -90,6 +92,7 @@ class AwsRequestProxy:
90
92
  action=original.operation.name,
91
93
  parameters=service_request,
92
94
  region=original.region,
95
+ protocol=original.protocol,
93
96
  )
94
97
  # update the newly created context with non-payload specific request headers (the payload can differ from
95
98
  # the original request, f.e. it could be JSON encoded now while the initial request was CBOR encoded)
@@ -184,7 +187,9 @@ def dispatch_to_backend(
184
187
  :raises ServiceException: if the dispatcher returned an error response
185
188
  """
186
189
  http_response = http_request_dispatcher(context)
187
- parsed_response = parse_response(context.operation, http_response, include_response_metadata)
190
+ parsed_response = parse_response(
191
+ context.operation, context.protocol, http_response, include_response_metadata
192
+ )
188
193
  raise_service_exception(http_response, parsed_response)
189
194
  return parsed_response
190
195
 
@@ -196,6 +201,7 @@ _non_validating_boto_config = BotoConfig(parameter_validation=False)
196
201
  def create_aws_request_context(
197
202
  service_name: str,
198
203
  action: str,
204
+ protocol: ProtocolName = None,
199
205
  parameters: Mapping[str, Any] = None,
200
206
  region: str = None,
201
207
  endpoint_url: str | None = None,
@@ -210,6 +216,7 @@ def create_aws_request_context(
210
216
 
211
217
  :param service_name: the AWS service
212
218
  :param action: the action to invoke
219
+ :param protocol: the protocol to use
213
220
  :param parameters: the invocation parameters
214
221
  :param region: the region name (default is us-east-1)
215
222
  :param endpoint_url: the endpoint to call (defaults to localstack)
@@ -222,6 +229,8 @@ def create_aws_request_context(
222
229
 
223
230
  service = load_service(service_name)
224
231
  operation = service.operation_model(action)
232
+ # TODO: remove this once every usage upstream has been removed
233
+ protocol = protocol or service.resolved_protocol
225
234
 
226
235
  # we re-use botocore internals here to serialize the HTTP request,
227
236
  # but deactivate validation (validation errors should be handled by the backend)
@@ -243,8 +252,14 @@ def create_aws_request_context(
243
252
  endpoint_url = "http://localhost.localstack.cloud"
244
253
  # pre-process the request args (some params are modified using botocore event handlers)
245
254
  parameters = client._emit_api_params(parameters, operation, request_context)
246
- request_dict = client._convert_to_request_dict(
247
- parameters, operation, endpoint_url, context=request_context
255
+
256
+ request_dict = _convert_to_request_dict_with_protocol(
257
+ client=client,
258
+ protocol=protocol,
259
+ api_params=parameters,
260
+ operation_model=operation,
261
+ endpoint_url=endpoint_url,
262
+ context=request_context,
248
263
  )
249
264
 
250
265
  if auth_path := request_dict.get("auth_path"):
@@ -266,7 +281,39 @@ def create_aws_request_context(
266
281
  context = RequestContext(request=create_http_request(aws_request))
267
282
  context.service = service
268
283
  context.operation = operation
284
+ context.protocol = protocol
269
285
  context.region = region
270
286
  context.service_request = parameters
271
287
 
272
288
  return context
289
+
290
+
291
+ def _convert_to_request_dict_with_protocol(
292
+ client,
293
+ protocol: ProtocolName,
294
+ api_params: dict,
295
+ operation_model: OperationModel,
296
+ endpoint_url: str,
297
+ context: dict,
298
+ set_user_agent_header: bool = True,
299
+ ) -> dict:
300
+ """
301
+ This function is taken from botocore Client._convert_to_request_dict, but we are overriding the serializer
302
+ Botocore does not expose a way to create a client with a specific protocol, but we need this functionality
303
+ to support multi-protocols.
304
+ """
305
+ serializer = create_serializer(protocol, include_validation=False)
306
+ request_dict = serializer.serialize_to_request(api_params, operation_model)
307
+ if not client._client_config.inject_host_prefix:
308
+ request_dict.pop("host_prefix", None)
309
+ if set_user_agent_header:
310
+ user_agent = client._user_agent_creator.to_string()
311
+ else:
312
+ user_agent = None
313
+ prepare_request_dict(
314
+ request_dict,
315
+ endpoint_url=endpoint_url,
316
+ user_agent=user_agent,
317
+ context=context,
318
+ )
319
+ return request_dict