If Lambda reports error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory, the Chromium binary launched by Puppeteer cannot find the NSS library in its runtime environment. Fix it by identifying the exact browser executable, checking all unresolved shared libraries with ldd, and deploying a browser plus compatible libraries for the Lambda runtime and CPU architecture. Installing only one file is not always sufficient: Chromium commonly needs a larger set of graphics, font, audio and system libraries.
What the libnss3.so error means
libnss3.so is part of Network Security Services (NSS), a shared-library dependency used by Chromium. Linux’s dynamic loader searches the deployed filesystem and configured library paths when the browser starts. If it cannot resolve NSS, Chromium exits before Puppeteer can create a page. Puppeteer’s Linux troubleshooting guidance lists libnss3 among Chromium’s Debian dependencies and advises installing all required dependencies.
This is normally a deployment mismatch, not a problem with page.goto() or another Puppeteer API. A browser that launches on your workstation may still fail in Lambda because your workstation supplies libraries that are absent from the function artifact.
Diagnose the deployed browser first
1. Determine which executable Lambda launches
Different projects may use Puppeteer’s downloaded Chrome for Testing, a separately packaged Chromium binary, or a Lambda-focused package such as @sparticuz/chromium. Log or inspect the value supplied to Puppeteer as executablePath. Also inspect the built ZIP, layer, or container image rather than the source tree; the path and binary in the deployed artifact are what matter.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
2. Check the binary’s shared libraries
In a Linux environment matching the Lambda runtime and architecture as closely as possible, run:
ldd /path/to/chrome | grep not
Every line containing “not found” is an unresolved dependency. If only libnss3.so is missing, provide a compatible NSS library. If several entries are missing, resolve the complete list; fixing NSS alone may merely expose the next failure. Run the check against the same browser build that will be shipped, not a system Chrome installed on your laptop.
3. Confirm architecture and runtime
The Chromium build and its libraries must match the Lambda CPU architecture (for example, x86_64 versus arm64) and the runtime’s ABI. A binary built for another architecture cannot be repaired by adding a library. Record the Lambda architecture, runtime family, Puppeteer version and Chromium version before selecting a package or build process.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Package Chromium and its libraries together
ZIP deployment or Lambda layer
Place the browser executable and its shared libraries in the function artifact or a layer, then set Puppeteer’s executable path to that location. Keep directory permissions executable and ensure the libraries are in a directory the loader searches, or configure the launch environment appropriately for your packaging method. Rebuild the artifact from a compatible Linux environment and inspect its contents before publishing.
Container image
A Lambda container image can package Chromium and system libraries together and is an AWS-documented route for browser automation. Build the image for the same architecture selected by the function, install the browser’s complete dependency set, and test the image before deployment. A container avoids some ZIP and layer packaging friction, but it does not remove the need for ABI-compatible libnss3.so and the other libraries reported by ldd.
Lambda-oriented Chromium packages
Puppeteer’s Lambda notes point to community Chromium resources, including @sparticuz/chromium. Treat package examples as versioned guidance, not a universal recipe. A Serverless Framework example using that package states that its example ships x86_64 binaries and instructs users to align the package’s major Chromium version with the version expected by puppeteer-core. Verify current package documentation and architecture support before copying the example.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Match Puppeteer, Chromium and Lambda versions
Puppeteer and Chromium are coupled more closely than their independent package names suggest. Check the browser major version expected by your Puppeteer release and the major version supplied by the Lambda Chromium package. Do not assume a package that worked with one Puppeteer release remains compatible after an upgrade. Pin versions in your lockfile, rebuild the artifact, and retest after changing either side.
AWS CloudWatch Synthetics publishes Puppeteer/Chromium combinations for its managed canary runtimes. Those combinations describe Synthetics, not libraries automatically present in every customer-created Lambda function. A Synthetics version table therefore cannot prove that ordinary Lambda includes libnss3.so.
Verify the exact Lambda artifact
- Build the ZIP, layer, or image in a Linux environment compatible with the target runtime and architecture.
- List the artifact and confirm the expected Chromium path, file mode and library directories.
- Run
lddagainst that exact binary and resolve every “not found” entry. - Deploy the rebuilt artifact, not an old cached layer or locally installed package.
- Invoke the function and capture the full launch error and executable path in CloudWatch logs.
Successful local execution establishes only that the local machine has the needed libraries. It does not establish that Lambda received them.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Common symptoms and fixes
| Symptom | Likely cause | Action |
|---|---|---|
libnss3.so “not found” |
NSS is absent or outside the loader’s search path. | Package a compatible NSS library with the browser and verify it with ldd. |
| Another library appears after NSS is added | The browser has multiple missing dependencies. | Resolve the complete ldd output rather than stopping at the first error. |
| Exec format error | Browser architecture does not match the Lambda function. | Use a browser build for the selected x86_64 or arm64 architecture and rebuild. |
| Works locally, fails only in Lambda | Local system libraries are not in the deployment artifact. | Inspect and test the deployed ZIP, layer or image in a matching environment. |
| Browser starts, then crashes or times out | Version mismatch, incomplete dependencies, or unsuitable launch configuration. | Align Puppeteer and Chromium major versions, inspect all dependencies, and review the runtime logs. |
Performance, reliability and deployment trade-offs
- ZIP/layer: convenient for teams already using artifact deployments, but browser size, layer composition and library paths must be managed explicitly.
- Container image: keeps the browser and operating-system libraries together and can simplify reproducibility, while adding image-build and registry workflows.
- Cold starts: larger browser artifacts can increase initialization work. Keep the browser outside the handler’s per-invocation setup where your design permits and avoid downloading it at runtime.
- Caching: cache directories and downloaded browsers from a local development machine are not a substitute for shipping the executable and libraries Lambda needs.
- Updates: treat Lambda runtime, architecture, Puppeteer and Chromium changes as a compatibility event; rebuild and rerun dependency checks.
Or skip the browser setup
If your goal is simply to obtain reliable website screenshots rather than operate Chromium inside Lambda, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP or PDF. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP tools—take_screenshot, get_page_info and capture_pdf—let Claude, Cursor and other MCP clients request captures without you packaging Chromium.
Use the API documentation at https://screenshotneo.com/docs/ for authentication and options. A minimal cURL request is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The equivalent Python request is:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes full-page and selector captures, lazy-image loading, dark mode, device presets, custom viewports and retina scale. You can set PDF paper, margins, orientation and page ranges; inject CSS or JavaScript; click or hide elements; wait for a selector, delay or network idle; block ads, trackers, requests or resource types; supply headers, cookies, user agents, authorization, timezone and geolocation; use transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous webhooks, bulk capture for up to 100 URLs per call, a usage API and an OpenAPI specification. Its parameter names are compatible with those used by many screenshot APIs.
Recommended Free Tools
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
FAQ
Is installing libnss3 on my laptop enough?
No. The library must be present and discoverable in the Lambda execution environment that launches the packaged Chromium binary.
Can I infer regular Lambda dependencies from CloudWatch Synthetics?
No. Synthetics runtimes are managed combinations and do not define the libraries in every customer Lambda function.
Should I replace Puppeteer with puppeteer-core?
That is a packaging choice, not a fix by itself. Whichever package you use, ship a compatible browser and verify its complete dependency set.
Frequently Asked Questions
Does the error indicate a bad website URL?
Usually no. The failure occurs while Chromium is loading its native libraries, before Puppeteer can navigate to the requested URL.
Where should I run ldd?
Run it against the browser executable from the built deployment artifact in an environment matching the Lambda runtime and CPU architecture as closely as possible.
The Bottom Line
Resolve the actual deployed Chromium binary’s complete ldd dependency list, package compatible libraries with it, and align architecture and versions. Recheck the artifact after every browser or Lambda change.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

