Metadata-Version: 2.1
Name: serverless-aws-lambda-sdk
Version: 0.1.21
Summary: Serverless AWS Lambda SDK for Python
Author: serverlessinc
Project-URL: changelog, https://github.com/serverless/console/blob/main/python/packages/aws-lambda-sdk/CHANGELOG.md
Project-URL: documentation, https://github.com/serverless/console/tree/main/python/packages/aws-lambda-sdk
Project-URL: homepage, https://www.serverless.com/console
Project-URL: repository, https://github.com/serverless/console
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: serverless-sdk (~=0.4.12)
Requires-Dist: serverless-sdk-schema (~=0.2.3)
Requires-Dist: typing-extensions (~=4.5)
Provides-Extra: tests
Requires-Dist: black (>=22.12) ; extra == 'tests'
Requires-Dist: boto3 (>=1.16.112) ; extra == 'tests'
Requires-Dist: flask (>=2.2.3) ; extra == 'tests'
Requires-Dist: importlib-metadata (>=5.2) ; extra == 'tests'
Requires-Dist: mypy (>=1.2) ; extra == 'tests'
Requires-Dist: pynamodb (>=5.5) ; extra == 'tests'
Requires-Dist: pytest (>=7.2) ; extra == 'tests'
Requires-Dist: pytest-aiohttp (>=1.0.4) ; extra == 'tests'
Requires-Dist: pytest-httpserver (>=1.0.6) ; extra == 'tests'
Requires-Dist: requests-mock (>=1.10) ; extra == 'tests'
Requires-Dist: ruff (>=0.0.199) ; extra == 'tests'
Requires-Dist: serverless-wsgi (>=3.0.2) ; extra == 'tests'
Requires-Dist: types-protobuf (>=4.22.0.2) ; extra == 'tests'
Requires-Dist: yarl (~=1.8.0) ; extra == 'tests'

# serverless-aws-lambda-sdk

## AWS Lambda [Serverless Console](https://www.serverless.com/console) SDK for Python

Instruments AWS Lambda functions, propagates traces to the [Serverless Console](https://www.serverless.com/console/docs) and exposes Serverless SDK to the function logic.

### Setup

#### 1. Register with [Serverless Console](https://console.serverless.com/)

#### 2. In [Serverless Console](https://console.serverless.com/) turn on integration for your AWS account and chosen Lambdas

#### 3. (optionally) Fine tune default instrumentation behavior with following options

##### `SLS_DISABLE_HTTP_MONITORING` (or `disable_http_monitoring`)

Disable tracing of HTTP and HTTPS requests

##### `SLS_DISABLE_REQUEST_RESPONSE_MONITORING` (or `disable_request_response_monitoring`)

(Dev mode only) Disable monitoring requests and reponses (function, AWS SDK requests and HTTP(S) requests)

##### `SLS_DISABLE_AWS_SDK_MONITORING` (or `disable_aws_sdk_monitoring`)

Disable automated AWS SDK monitoring

##### `SLS_DISABLE_FLASK_MONITORING` (or `disable_flask_monitoring`)

Disable automated flask monitoring

### Instrumentation

AWS Lambda SDK automatically creates `aws.lambda`, `aws.lambda.initialization` and `aws.lambda.invocation` trace spans.
For more details see [SDK Trace spans documentation](docs/sdk-trace.md)

Additionally automatic instrumentation (with caveats) is provided for:

- [HTTP(s) requests](/python/packages/sdk/docs/instrumentation/http.md)
- [Flask app](/python/packages/sdk/docs/instrumentation/flask-app.md)
- [AWS SDK requests](docs/instrumentation/aws-sdk.md)

### SDK API

- [serverlessSdk](docs/sdk.md)
