npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@beesolve/efs-pre-signed-url

v1.1.0

Published

SDK and CDK constructs for EFS Pre-signed URL service.

Downloads

6

Readme

EFS Pre-signed URL

SDK and CDK constructs for EFS Pre-signed URL service.

The service is provided by BeeSolve and can be pruchased at AWS Marketplace.

Installation

npm i @beesolve/efs-pre-signed-url

Usage

import { Vpc } from "aws-cdk-lib/aws-ec2";
import { AccessPoint, FileSystem } from "aws-cdk-lib/aws-efs";
import {
  Architecture,
  FileSystem as LambdaFileSystem,
  Runtime,
} from "aws-cdk-lib/aws-lambda";
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
import { Duration, Environment, Stack } from "aws-cdk-lib/core";
import { Construct } from "constructs";
import { resolve } from "node:path";

import { EfsPreSignedUrl } from "@beesolve/efs-pre-signed-url/cdk";

export class YourStack extends Stack {
  constructor(scope: Construct, id: string, props: { env: Environment }) {
    super(scope, id, {
      env: props.env,
    });

    const vpc = Vpc.fromLookup(this, "Vpc", {
      isDefault: true,
    });

    const efs = new FileSystem(this, "FileSystem", {
      vpc,
    });

    // Create EfsPreSignedUrl construct
    const efsPreSignedUrl = new EfsPreSignedUrl(this, "EfsPrePignedUrl", {
      accessPoint: new AccessPoint(this, "AccessPoint", {
        fileSystem: efs,
        posixUser: { gid: "1000", uid: "1000" },
        // the presigner only needs read permissions
        createAcl: { ownerGid: "1000", ownerUid: "1000", permissions: "444" },
        path: "/path-to-your-files",
      }),
      // you can provide secret by any other means
      preSharedSecret: new Secret(this, "PreSharedSecret", {
        generateSecretString: {
          passwordLength: 128,
        },
      }).secretValue.toString(),
      vpc,
    });

    // your handler which will use EFS Pre-signed URL
    const handler = new NodejsFunction(this, "Handler", {
      entry: resolve(__dirname, "handler.ts"),
      handler: "handler",
      bundling: {
        target: "es2022",
      },
      memorySize: 256,
      timeout: Duration.seconds(5),
      runtime: Runtime.NODEJS_22_X,
      architecture: Architecture.ARM_64,
      filesystem: LambdaFileSystem.fromEfsAccessPoint(new AccessPoint(this, "AccessPoint", {
        fileSystem: efs,
        posixUser: { gid: "1000", uid: "1000" },
        // in the below example we want to create file in the EFS so we need write permissions as well
        createAcl: { ownerGid: "1000", ownerUid: "1000", permissions: "755" },
        path: "/path-to-your-files",
      }), "/mnt/data"),
      vpc
    });

    // allows usage of SDK in the handler function
    efsPreSignedUrl.grantAccess(handler);
  }
}

Once you've set up the CDK part you can start using our SDK in the handler like this:

import { writeFileSync } from "node:fs";
import { EfsPreSignedUrlClient } from "@beesolve/efs-pre-signed-url/sdk";

// create EfsPreSignedUrl client
const client = new EfsPreSignedUrlClient({ defaultExpirationInSeconds: 30 });

export const handler = async () => {
  const path = "/mnt/data/test.json";

  writeFileSync(
    path,
    JSON.stringify({
      testFile: true,
      createdAt: new Date(),
    }),
  );

  return {
    body: JSON.stringify({ url: client.toSignedUrl(path) }),
    statusCode: 200,
    headers: { "Content-Type": "text/json" },
  };
};

The handler will return pre-signed URL which will serve the file from your EFS.

Documentation

Further documentation can be found at marketplace.beesolve.com.