Feature- Node.js including .ts files when searching for handler
@jtuliani is already working on this.
Since Nov 27, 2025.
Assessment
This issue has not been assessed yet.
Description
Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do * not help prioritize the request
If you are interested in providing additional feedback, please leave a comment
Description
Since Node v22.18.0 the node.js loader can load .ts files by default (and since V22.6.0 with the feature flag), that can already be utilized within lambdas.
The only issue is that file including handler still needs to be .{m,c}js file. So to harvest value from running TypeScript natively we need to do workarounds like having index.js file with following:
import { handler } from 'actualIndexFile.ts';
export const handler = async (event, context) => await handler(event, context);
Additional context
- Since underlying Node.js loader is capable of handling the .ts files (from versions mentioned) it should hopefully be small change to also look for .{m,,c}ts files along .{m,c}js when looking for handler from Lambda command.
- Unless bundling is needed, running TypeScript natively provides values like no longer needing source-maps, moving compilation to validation stage of release, unifying tech-stack.
- Dominant language
- No language data
- Stars
- 196
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-roadmap
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#101 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
aws/aws-lambda-roadmap#100 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
aws/aws-lambda-roadmap#97 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#96 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#95 · 1 comment · 1 reaction ·