---
title: "AWS Lambda tracing with the Python SDK"
description: "Sentry Python SDK 3.0 connects distributed traces across synchronous Lambda Invoke calls by carrying sentry-trace and baggage values in the invocation's custom client context."
url: "https://swe.quest/articles/aws-lambda-tracing-with-the-python-sdk-fd2929ecae33d9c0"
canonical: "https://blog.sentry.io/sentry-python-aws-lambda/"
source: "Sentry"
published: "2026-11-30"
difficulty: "medium"
kind: "Release"
reading_minutes: 2
tags: ["observability","serverless","python","cloud","messaging"]
---

# AWS Lambda tracing with the Python SDK

A post on [Sentry](https://swe.quest/sources/sentry.md), published 2026-11-30, 2 min read, Release. Original: [https://blog.sentry.io/sentry-python-aws-lambda/](https://blog.sentry.io/sentry-python-aws-lambda/)

## Summary

Sentry Python SDK 3.0 connects distributed traces across synchronous Lambda Invoke calls by carrying sentry-trace and baggage values in the invocation's custom client context. It also links SQS and SNS producers to consumers through message attributes. Both are automatic when boto3 is used with the default Boto3Integration, and non-Python callers can set the values manually using the snippets shown. Bedrock Converse and ConverseStream calls now produce GenAI spans with inputs, outputs and token usage.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)

## Prerequisites

- AWS Lambda ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- distributed tracing basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- boto3

## Keywords

Sentry, AWS Lambda, boto3, Amazon SQS, Amazon SNS, Amazon Bedrock, sentry-python

## Related posts

- [Keeping it Bref: Sentry now supports PHP on AWS Lambda](https://swe.quest/articles/keeping-it-bref-sentry-now-supports-php-on-aws-lambda-57aed80b39dce9ab.md): Sentry · 2026-11-18 · Medium · 4 min read · PHP, Serverless, Observability, Cloud platforms
  The new sentry/sentry-bref integration reports PHP errors on AWS Lambda that the Sentry SDK cannot see from inside PHP-FPM, such as timeouts (Bref kills PHP-FPM 1 second before the Lambda deadline) and responses over the 6 MB limit.
- [Five things you can do with Sentry’s Agent Tracing](https://swe.quest/articles/five-things-you-can-do-with-sentry-s-agent-tracing-5ac2ff6886459921.md): Sentry · 2026-10-28 · Medium · 19 min read · AI agents, Observability, Evaluation, LLMs
  Sentry's Agent Tracing captures model calls, tool executions and multi-agent handoffs in a single trace, and Sentry Cookbook recipes build workflows on top of that data.
- [Building Sentry's Laravel AI Integration](https://swe.quest/articles/building-sentry-s-laravel-ai-integration-db97aa7ed43fc2ee.md): Sentry · 2026-09-21 · Medium · 4 min read · PHP, Observability, AI agents, AI for coding
  Sentry's Laravel AI integration, shipped in sentry-laravel 4.27, adds Agent Tracing to Laravel AI agents with no code changes.
- [Inside Laravel Nightwatch’s Observability Pipeline: Real-Time Event Processing with Amazon MSK and ClickHouse Cloud](https://swe.quest/articles/inside-laravel-nightwatch-s-observability-pipeline-real-time-event-processing-2274d87b280c63f4.md): ClickHouse · 2025-10-08 · Easy · 5 min read · Observability, Analytics & OLAP, Queues & messaging, Cloud platforms, System design
  Laravel Nightwatch, Laravel's first-party observability platform, ingests telemetry through API Gateway and Lambda into Amazon MSK Express brokers, then streams it into ClickHouse Cloud via ClickPipes, with materialized views pre-aggregating raw JSON.
- [Tracing Notifications](https://swe.quest/articles/tracing-notifications-050fff7612252fe6.md): Slack Engineering · 2023-04-04 · Medium · 10 min read · Observability, Communications, Distributed systems, Analytics & OLAP
  Slack models every notification as its own distributed trace, using the notification\_id as the trace\_id and span links back to the sender's message trace, so notification flows can be sampled at 100% while ordinary backend requests stay at 1%.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
