Skip to content

Commit eee52ee

Browse files
authored
docs(aws-integration): Remove alert that ESM is not supported (#14756)
The AWS integration supports both ESM and CJS now
1 parent ec6968d commit eee52ee

File tree

1 file changed

+6
-13
lines changed
  • docs/organization/integrations/cloud-monitoring/aws-lambda

1 file changed

+6
-13
lines changed

docs/organization/integrations/cloud-monitoring/aws-lambda/index.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ sidebar_order: 1
44
description: "Learn more about Sentry's AWS Lambda integration and how you can automatically instrument your Node or Python Lambda functions with Sentry without changing your code."
55
---
66

7-
<Alert>
8-
9-
This method of setting up Sentry in your Lambda functions only works if your Lambda functions are run in Node CommonJS (`require` syntax) or in Python.
10-
For all other setups, check out these docs for [Node](/platforms/javascript/guides/aws-lambda/) or [Python](/platforms/python/integrations/aws-lambda/) instead.
11-
12-
</Alert>
13-
147
Connect Sentry to your AWS account to automatically add Sentry error and performance monitoring to your Node/Python Lambda functions.
158

169
## Install
@@ -111,7 +104,7 @@ If you're using [Serverless framework](https://www.serverless.com/), note that t
111104

112105
You can confirm that the output works by inputting `aws lambda get-function-configuration --function-name <yourFunctionName>`. However, when you perform a subsequent `sls deploy` the environment variables aren't maintained even though it looks like the reference to the layer is retained.
113106

114-
You can set the layer definition and environment variables in `serverless.yml` as a workaround, but you'll have to do two things manually: maintain the latest layer version and add the reference to the SDK layer for every function you want "Sentrified".
107+
You can set the layer definition and environment variables in `serverless.yml` as a workaround, but you'll have to do two things manually: maintain the latest layer version and add the reference to the SDK layer for every function you want to add Sentry to.
115108

116109
**Serverless Framework Using Node:**
117110

@@ -123,12 +116,12 @@ provider:
123116
region: <AWS_REGION>
124117
environment:
125118
SENTRY_TRACES_SAMPLE_RATE: "1.0"
126-
SENTRY_DSN: "<SENTRY_DSN>"
127-
NODE_OPTIONS: "-r @sentry/aws-serverless/dist/awslambda-auto"
119+
SENTRY_DSN: "___PUBLIC_DSN___"
120+
NODE_OPTIONS: "--import @sentry/aws-serverless/awslambda-auto"
128121

129122
custom:
130123
layers:
131-
- arn:aws:lambda:${self:provider.region}:943013980633:layer:SentryNodeServerlessSDK:26
124+
- arn:aws:lambda:${self:provider.region}:943013980633:layer:SentryNodeServerlessSDKv10:15
132125
# - arn:aws:lambda:${self:provider.region}:943013980633:layer:SentryNodeServerlessSDK:latest
133126

134127
functions:
@@ -147,11 +140,11 @@ provider:
147140
region: <AWS_REGION>
148141
environment:
149142
SENTRY_TRACES_SAMPLE_RATE: "1.0"
150-
SENTRY_DSN: "<SENTRY_DSN>"
143+
SENTRY_DSN: "___PUBLIC_DSN___"
151144

152145
custom:
153146
layers:
154-
- arn:aws:lambda:${self:provider.region}:943013980633:layer:SentryPythonServerlessSDK:6
147+
- arn:aws:lambda:${self:provider.region}:943013980633:layer:SentryPythonServerlessSDK:167
155148
# - arn:aws:lambda:${self:provider.region:943013980633:layer:SentryPythonServerlessSDK:latest
156149

157150
functions:

0 commit comments

Comments
 (0)