Gathering detailed insights and metrics for aws-serverless-fastify
Gathering detailed insights and metrics for aws-serverless-fastify
Gathering detailed insights and metrics for aws-serverless-fastify
Gathering detailed insights and metrics for aws-serverless-fastify
Port of aws-serverless-express to work with Fastify WebServer.
npm install aws-serverless-fastify
Typescript
Module System
Node Version
NPM Version
TypeScript (95.48%)
JavaScript (4.52%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
42 Stars
166 Commits
4 Forks
3 Watchers
15 Branches
4 Contributors
Updated on Jun 30, 2025
Latest Version
3.1.0
Package Id
aws-serverless-fastify@3.1.0
Unpacked Size
108.67 kB
Size
56.45 kB
File Count
20
NPM Version
10.8.0
Node Version
20.11.0
Published on
May 16, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
1
24
A port of the AWSLABS aws-serverless-express library tailor made for the Fastify web framework. Inspired by wanting to use the Fastify gracefully in Nest projects with Lambda. Plus it's called Fastify, how cool is that!
Version 1.x compatible with nestjs 7.x and Fastify 2.x Version 2.x compatible with nestjs 8.x and Fastify 3.x Version 3.x compatible with nestjs 9.x and Fastify 4.x
1$ npm install aws-serverless-fastify
Nest example is provided here. Below is the summary.
lambda-entrypoint.ts (I think the lambda-entrypoint.ts is much cleaner than what is proposed by Fastify)
1import { 2 Context, 3 APIGatewayProxyEvent, 4 APIGatewayProxyResult, 5} from 'aws-lambda'; 6import { bootstrap } from './app'; 7import * as fastify from 'fastify'; 8import { proxy } from 'aws-serverless-fastify'; 9 10let fastifyServer: fastify.FastifyInstance; 11 12export const handler = async ( 13 event: APIGatewayProxyEvent, 14 context: Context, 15): Promise<APIGatewayProxyResult> => { 16 if (!fastifyServer) { 17 fastifyServer = await bootstrap(); 18 } 19 return await proxy(fastifyServer, event, context); 20};
app.ts (Setup the application once in app.ts)
1import { NestFactory } from '@nestjs/core'; 2import { AppModule } from './app.module'; 3import { 4 FastifyAdapter, 5 NestFastifyApplication, 6} from '@nestjs/platform-fastify'; 7import * as fastify from 'fastify'; 8 9export async function bootstrap(): Promise<fastify.FastifyInstance> { 10 const serverOptions: fastify.ServerOptionsAsHttp = { 11 logger: true, 12 }; 13 const instance: fastify.FastifyInstance = fastify(serverOptions); 14 const nestApp = await NestFactory.create<NestFastifyApplication>( 15 AppModule, 16 new FastifyAdapter(instance), 17 ); 18 nestApp.setGlobalPrefix('api'); 19 nestApp.enableCors(); 20 await nestApp.init(); 21 return instance; 22}
main.ts (Will still serve to run the Nest App locally)
1import { bootstrap } from './app'; 2 3async function startLocal() { 4 const fastifyInstance = await bootstrap(); 5 fastifyInstance.listen(3000); 6} 7 8startLocal();
Not meant to be exhaustive by any means but here are some basic load tests comparisons through API Gateway via Artillery. aws-serverless-fastify versus aws-serverless-express
Pull Requests are welcome! We just thought this was a cool idea to simplify! Important: Commits should follow Angluar conventional-changelog format :)
aws-serverless-fastify is MIT licensed.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/10 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More