summaryrefslogtreecommitdiff
path: root/docs/integrations/awslambda.rst
diff options
context:
space:
mode:
authorAshley Camba Garrido <ashwoods@gmail.com>2017-10-10 17:47:17 +0200
committerAshley Camba Garrido <ashwoods@gmail.com>2017-10-11 15:42:49 +0200
commit799b1485e0175a6337c09ff6941f3f332b3a26d4 (patch)
treeee6e62184534c16ecdf8bfa52652fa52647e5b2d /docs/integrations/awslambda.rst
parenta1e40734c80e756746f0c24e23784a6780b8f502 (diff)
downloadraven-799b1485e0175a6337c09ff6941f3f332b3a26d4.tar.gz
feature(lambda): Add lambda tests and client
Diffstat (limited to 'docs/integrations/awslambda.rst')
-rw-r--r--docs/integrations/awslambda.rst56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/integrations/awslambda.rst b/docs/integrations/awslambda.rst
new file mode 100644
index 0000000..a1dacc1
--- /dev/null
+++ b/docs/integrations/awslambda.rst
@@ -0,0 +1,56 @@
+Amazon Web Services Lambda
+==========================
+
+.. default-domain:: py
+
+
+
+Installation
+------------
+
+To use `Sentry`_ with `AWS Lambda`_, you have to install `raven` as an external
+dependency. This involves creating a `Deployment package`_ and uploading it
+to AWS.
+
+To install raven into your current project directory:
+
+.. code-block:: console
+
+ pip install raven -t /path/to/project-dir
+
+Setup
+-----
+
+Create a `LambdaClient` instance and wrap your lambda handler with
+the `capture_exeptions` decorator:
+
+
+.. sourcecode:: python
+
+ from raven.contrib.awslambda import LambdaClient
+
+
+ client = LambdaClient()
+
+ @client.capture_exceptions
+ def handler(event, context):
+ ...
+ raise Exception('I will be sent to sentry!')
+
+
+By default this will report unhandled exceptions and errors to Sentry.
+
+Additional settings for the client are configured using environment variables or
+subclassing `LambdaClient`.
+
+
+
+Advanced Usage
+--------------
+
+
+.. _Sentry: https://getsentry.com/
+.. _AWS Lambda: https://aws.amazon.com/lambda
+.. _Deployment package: https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
+
+