How to use serverless-aws-static-file-handler - 1 common examples

To help you get started, we’ve selected a few serverless-aws-static-file-handler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github josephluck / internote / ui / service-worker / lambda.ts View on Github external
import StaticFileHandler from "serverless-aws-static-file-handler";
import * as path from "path";

const clientFilesPath = path.join(__dirname, "../.service-worker/");
const fileHandler = new StaticFileHandler(clientFilesPath);

export const handler = async (event, context) => {
  return fileHandler.get(event, context);


Easily serve static files with the Serverless Framework on AWS Lambda.

Latest version published 3 months ago

Package Health Score

74 / 100
Full package analysis

Popular serverless-aws-static-file-handler functions