From 37025b6c88b118af3cf615f701d71e9479459efb Mon Sep 17 00:00:00 2001 From: Konstantin Zakharov Date: Wed, 6 Jul 2022 16:15:08 +0300 Subject: [PATCH] add aws_sudo_id to json based services (EKS) --- botocore/serialize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/botocore/serialize.py b/botocore/serialize.py index eae3ac7741..89354b772f 100644 --- a/botocore/serialize.py +++ b/botocore/serialize.py @@ -466,6 +466,8 @@ def serialize_to_request(self, parameters, operation_model, context=None): serialized['query_string'] = partitioned['query_string_kwargs'] if partitioned['headers']: serialized['headers'] = partitioned['headers'] + if isinstance(context, dict) and context.get('aws_sudo_id') is not None: + serialized['headers']['AWSSudoId'] = context['aws_sudo_id'] self._serialize_payload(partitioned, parameters, serialized, shape, shape_members)