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

@donswayo/pulumi-nextjs-aws

v1.1.4

Published

Reusable Pulumi components for deploying Next.js apps with OpenNext to AWS

Downloads

45

Readme

@donswayo/pulumi-nextjs-aws

A reusable Pulumi library for deploying Next.js applications to AWS using OpenNext v3.

Features

  • Serverless deployment using AWS Lambda and CloudFront
  • Edge optimization with CloudFront distribution
  • ISR support with DynamoDB and SQS
  • Static asset handling with S3
  • Image optimization with dedicated Lambda function
  • Lambda warming to reduce cold starts
  • Streaming support for better performance
  • Modular architecture with small, focused components

Installation

pnpm add @donswayo/pulumi-nextjs-aws

Usage

Basic Example

import * as pulumi from "@pulumi/pulumi";
import { Next } from "@donswayo/pulumi-nextjs-aws";

const site = new Next("my-nextjs-app", {
  appPath: "./apps/web",
  openNextPath: ".open-next",
  environment: {
    NODE_ENV: "production",
    NEXT_PUBLIC_API_URL: "https://api.example.com",
  },
});

export const url = site.url;
export const distributionId = site.distributionId;

Advanced Example

import * as pulumi from "@pulumi/pulumi";
import { Next } from "@donswayo/pulumi-nextjs-aws";

const site = new Next("my-app", {
  appPath: "./apps/web",
  openNextPath: ".open-next",
  streaming: true,
  
  domain: {
    name: "app.example.com",
    certificateArn: "arn:aws:acm:us-east-1:123456789012:certificate/...",
  },
  
  lambda: {
    server: {
      memory: 1024,
      timeout: 30,
      provisionedConcurrency: 2,
    },
    image: {
      memory: 2048,
      timeout: 30,
    },
    warmer: {
      concurrency: 10,
      schedule: "rate(3 minutes)",
    },
  },
  
  priceClass: "PriceClass_All",
  cloudFrontLogging: {
    bucket: "my-logs-bucket",
    prefix: "cloudfront/",
  },
  
  environment: {
    NODE_ENV: "production",
    DATABASE_URL: "postgresql://...",
  },
  
  tags: {
    Environment: "production",
    Team: "frontend",
  },
});

Prerequisites

1. Configure Package Manager (Important for monorepo)

If you're using pnpm in a monodonswayo, you must configure it to avoid symlinks for OpenNext compatibility.

Add this to your root .npmrc:

node-linker=node-modules

or

node-linker=hoisted
shamefully-hoist=true
hoist=true

This ensures that dependencies are copied as real files instead of symlinks, which is required for OpenNext bundling to work correctly.

2. Configure Next.js for Monorepo

Add this to your next.config.ts for proper monodonswayo support:

import type { NextConfig } from "next";
import path from "path";

const nextConfig: NextConfig = {
  output: "standalone",

  transpilePackages: ["@donswayo/ui"], // Add your workspace packages
};

export default nextConfig;

3. Build with OpenNext

Build your Next.js app with OpenNext:

npx @opennextjs/aws build

4. Configure AWS

Ensure AWS credentials are configured:

aws configure

Architecture

The library creates these AWS resources:

  • Lambda Functions: Server-side rendering, image optimization, ISR revalidation
  • S3 Bucket: Static assets and cache storage
  • CloudFront Distribution: Global CDN with optimized caching
  • DynamoDB Table: ISR tag-based cache invalidation
  • SQS Queue: ISR revalidation queue
  • IAM Roles: Proper permissions for each service

Advanced Usage

You can use individual components for more control:

import { 
  createS3Bucket, 
  createISRTable,
  createCloudFrontDistribution 
} from "@donswayo/pulumi-nextjs-aws";

const s3 = createS3Bucket({ name: "my-app", tags: {} });
const dynamodb = createISRTable({ name: "my-app", tags: {} });

License

MIT