DocsSentry for Python on AWS Lambda
Using Sentry with AWS Lambda and Python makes debugging as painless as possible, so you can keep everything up and running.
200k+ organizations trust us to monitor their apps
- GitHub
- Atlassian
- Disney
- Cloudflare
- Microsoft
- Cursor
Code-Level Visibility

Quickly Identify Function Latencies

Fill in the Gaps

Custom Dashboards and Reporting

Customer story
We reduced false alerts by more than 50% by fine tuning the thresholds and defining the criteria that works best for us with Sentry alerts-it's a completely new world for monday.com.
Getting Started is Simple
Install our Python SDK into your deployment package using pip:
pip install --target ./package --upgrade sentry-sdkThen use the AWS Lambda integration for the Python SDK like this:
import sentry_sdk
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
sentry_sdk.init(
dsn="https://<key>@sentry.io/<project>",
# Check https://docs.sentry.io/platforms/python/data-management/data-collected/ to configure what data is collected
data_collection={
"user_info": True,
},
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
# We recommend adjusting this value in production.
traces_sample_rate=1.0,
integrations=[AwsLambdaIntegration()],
)
def lambda_handler(event, context):
# ...FAQs
How does Sentry differentiate from CloudWatch or Stackdriver?
Sentry uses run-time instrumentation to capture errors. This allows users to get to the root of the problems using stack traces, breadcrumbs, function context and environment context.
CloudWatch/Stackdriver logs and metrics are hard to use to debug issues. The information is limited to some log statements and usually don't have the context needed to debug issues.
What's the difference between run-time instrumentation versus Log Forwarding?
Sentry uses run-time instrumentation to get real time visibility into execution environment and report all relevant info to be able to quickly debug issues. For example source code visibility when issues occur.
CloudWatch or Stackdriver log forwarding requires parsing through logs and usually are limited to details that already exist in logs.
Does Sentry captures anything other than errors?
Sentry supports distributed tracing in addition to error monitoring for serverless functions.
How much does Sentry cost?
You can get started for free. Pricing is based on the errors, spans, logs, replays and other data you send. For more details, visit our pricing page.




