Skip to content

docs(lambda): AWS Lambda extension SDK support #2931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/sources/configure-client/aws-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ Configure the extension with the following environment variables:

### Integrate the Pyroscope SDK

The Pyroscope AWS Lambda extension is compatible with all existing Pyroscope SDKs. Here are some key considerations:
- Initialize the SDK before setting up the AWS Lambda handler.
- Ensure that the Pyroscope server address is configured to http://localhost:4040.

Note that the SDK packages are not automatically included in the extension layer. For Java, Python, Node.js, and Ruby, you must either include the SDK package in the function deployment package or add it as a Lambda layer. Refer to the detailed guide in the AWS Lambda documentation for your specific runtime for further instructions:
- [Java](https://docs.aws.amazon.com/lambda/latest/dg/java-package.html#java-package-layers)
- [Python](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-dependencies)
- [Ruby](https://docs.aws.amazon.com/lambda/latest/dg/ruby-package.html#ruby-package-runtime-dependencies)
- [Node.js](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html#nodejs-package-dependencies)

For a Golang Lambda function, integrate the Pyroscope SDK as follows:

```go
Expand All @@ -78,7 +88,7 @@ func main() {
}
```

Replace `simple.golang.lambda` with your application name. The `ServerAddress` must be `http://localhost:4040`.
Replace `simple.golang.lambda` with your application name.

## Use cases

Expand Down