From f55918d782dc32e42effe93535056b0599bc9d7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Burak=20Varl=C4=B1?= <burakvar@amazon.co.uk>
Date: Tue, 15 Nov 2022 10:13:13 +0000
Subject: [PATCH] Print summary of Lambda context in Pokemon service

---
 .../examples/pokemon_service.py                      | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/rust-runtime/aws-smithy-http-server-python/examples/pokemon_service.py b/rust-runtime/aws-smithy-http-server-python/examples/pokemon_service.py
index 393adbf592..2fcf2d4c89 100644
--- a/rust-runtime/aws-smithy-http-server-python/examples/pokemon_service.py
+++ b/rust-runtime/aws-smithy-http-server-python/examples/pokemon_service.py
@@ -200,7 +200,17 @@ def get_pokemon_species(
     input: GetPokemonSpeciesInput, context: Context
 ) -> GetPokemonSpeciesOutput:
     if context.lambda_ctx is not None:
-        logging.debug("Lambda Context: %s", context.lambda_ctx)
+        logging.debug(
+            "Lambda Context: %s",
+            dict(
+                request_id=context.lambda_ctx.request_id,
+                deadline=context.lambda_ctx.deadline,
+                invoked_function_arn=context.lambda_ctx.invoked_function_arn,
+                function_name=context.lambda_ctx.env_config.function_name,
+                memory=context.lambda_ctx.env_config.memory,
+                version=context.lambda_ctx.env_config.version,
+            ),
+        )
     context.increment_calls_count()
     flavor_text_entries = context.get_pokemon_description(input.name)
     if flavor_text_entries: