TLS: ReferenceError: Error resolving module '/var/task/tls
- Dominant language
- Rust
- Stars
- 8.8k
- Forks
- 393
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 45
Description
Hello,
as suspected, TLS is the one that blocks the first usage of this LLRT
Lambda config:
```
Function:
MemorySize: 256
Architectures: ["arm64"]
Runtime: provided.al2
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:LLRT:1
```
Deployed with
```
Metadata:
BuildMethod: esbuild
BuildProperties:
External:
- '@aws-sdk/client-dynamodb'
- '@aws-sdk/util-dynamodb'
- '@aws-sdk/client-sqs'
- '@aws-sdk/node-http-handler'
- '@aws-sdk/client-sqs'
Minify: true
Target: "es2020"
Sourcemap: false
EntryPoints:
- list.ts
```
Packages:
```
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.433.0",
"@aws-sdk/util-dynamodb": "^3.433.0",
"@aws-sdk/client-sqs": "^3.433.0",
"@gomomento/sdk": "^1.45.0",
"uuid": "^9.0.1"
},
```
Log:
```
INIT_START Runtime Version: provided:al2.v25 Runtime Version ARN: arn:aws:lambda:eu-central-1::runtime:dce29199fb5887a2c4fceaa2f34d395ba43a74a6895b381cb9383b1c7f3b5875
Binary launched
Decompressing using 2 threads
Extraction time: 13.0210 ms
Extraction + write time: 17.8990 ms
Starting app
Error resolving module '/var/task/tls' from '/var/task/list.js'
START RequestId: d8cd0ae3-357a-4cbf-83c1-6351390603e8 Version: $LATEST
Unknown application error occurred Runtime.Unknown
END RequestId: d8cd0ae3-357a-4cbf-83c1-6351390603e8
REPORT RequestId: d8cd0ae3-357a-4cbf-83c1-6351390603e8 Duration: 1063.00 ms Billed Duration: 1063 ms Memory Size: 256 MB Max Memory Used: 28 MB
```
Contributor guide
Research direction
Reproduce the failure with the provided Lambda configuration and deployment settings, then inspect the TLS import path from list.ts as bundled into /var/task/list.js. Start with the runtime's module-resolution behavior for /var/task/tls and confirm the fix by deploying again without the Runtime.Unknown error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100