@@ -397,13 +397,24 @@ public void wrapInputStream(GenerationContext context, PythonWriter writer) {
397397 writer .addImport ("smithy_core.aio.types" , "AsyncBytesReader" );
398398 writer .addImport ("smithy_core.types" , "TimestampFormat" );
399399 writer .addImport ("aws_event_stream.aio" , "AWSInputEventStream" );
400+ writer .addImport ("aws_sdk_signers" , "AsyncEventSigner" );
400401 writer .write (
401402 """
403+ # TODO - Move this out of the RestJSON generator
404+ signer_properties = context.properties.get("signer_properties") # type: ignore
405+ identity = context.properties.get("identity") # type: ignore
406+ signature = context.properties.get("signature") # type: ignore
407+ signer = AsyncEventSigner(
408+ signing_properties=signer_properties, # type: ignore
409+ identity=identity, # type: ignore
410+ initial_signature=signature, # type: ignore
411+ )
402412 codec = JSONCodec(default_timestamp_format=TimestampFormat.EPOCH_SECONDS)
403413 return AWSInputEventStream[Any, Any](
404414 payload_codec=codec,
405415 awaitable_output=awaitable_output,
406416 async_writer=request_context.transport_request.body, # type: ignore
417+ signer=signer, # type: ignore
407418 )
408419 """ );
409420 }
@@ -439,15 +450,27 @@ public void wrapDuplexStream(GenerationContext context, PythonWriter writer) {
439450 writer .addImport ("smithy_core.aio.types" , "AsyncBytesReader" );
440451 writer .addImport ("smithy_core.types" , "TimestampFormat" );
441452 writer .addImport ("aws_event_stream.aio" , "AWSDuplexEventStream" );
453+ writer .addImport ("aws_sdk_signers" , "AsyncEventSigner" );
442454 writer .write (
443455 """
456+ # TODO - Move this out of the RestJSON generator
457+ signer_properties = context.properties.get("signer_properties") # type: ignore
458+ identity = context.properties.get("identity") # type: ignore
459+ signature = context.properties.get("signature") # type: ignore
460+ signer = AsyncEventSigner(
461+ signing_properties=signer_properties, # type: ignore
462+ identity=identity, # type: ignore
463+ initial_signature=signature, # type: ignore
464+ )
465+
444466 codec = JSONCodec(default_timestamp_format=TimestampFormat.EPOCH_SECONDS)
445467 return AWSDuplexEventStream[Any, Any, Any](
446468 payload_codec=codec,
447469 async_writer=request_context.transport_request.body, # type: ignore
448470 awaitable_output=awaitable_output,
449471 awaitable_response=response_future,
450472 deserializer=event_deserializer, # type: ignore
473+ signer=signer, # type: ignore
451474 )
452475 """ );
453476 }
0 commit comments