-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathrun.mjs
More file actions
17 lines (15 loc) · 572 Bytes
/
run.mjs
File metadata and controls
17 lines (15 loc) · 572 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import child_process from 'node:child_process';
child_process.execSync('node ./src/run-lambda.mjs', {
stdio: 'inherit',
env: {
...process.env,
// On AWS, LAMBDA_TASK_ROOT is usually /var/task but for testing, we set it to the CWD to correctly apply our handler
LAMBDA_TASK_ROOT: process.cwd(),
_HANDLER: 'src/lambda-function.handle',
NODE_OPTIONS: '--import @sentry/aws-serverless/awslambda-auto',
SENTRY_DSN: 'http://public@localhost:3031/1337',
SENTRY_TRACES_SAMPLE_RATE: '1.0',
SENTRY_DEBUG: 'true',
},
cwd: process.cwd(),
});