Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The first thing to check is an architecture mismatch: compare the Lambda function’s configured instruction-set architecture with the architecture of the Chromium executable and package you deployed. The message /tmp/chromium: cannot execute binary file means the Linux environment could not start that file; the path only tells you where the file is, not whether it can run there.

What this Chromium error actually means

Puppeteer can report this error before a browser window, page, or network request exists. In this situation, Lambda has reached the executable but the operating system cannot execute it in the current environment. A binary built for a different CPU architecture is a common cause of this Linux error.

Lambda functions are configured for an instruction-set architecture such as x86_64 or arm64. Your Chromium executable, its native libraries, and the package or layer that delivered them must be compatible with that choice. A file named /tmp/chromium can still be the wrong build.

A 2022 Sparticuz Chromium issue documents this exact family of failure. The reporter had selected Lambda arm64 and said switching the function to x86_64 resolved that setup. That is evidence about the package and version involved in that report, not a rule that every current Chromium release requires x86_64. Current support must be checked for the exact package version you deploy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fastest path to a fix

  1. Read the function architecture. In the Lambda console, open Functions, select the function, choose Configuration, open Runtime settings, and select Edit. Record the value shown for Architecture. You can also query it with the AWS CLI:
    aws lambda get-function-configuration --function-name YOUR_FUNCTION --query 'Architectures' --output text
  2. Identify the Chromium artifact. Determine whether /tmp/chromium came from a deployment zip, a Lambda layer, a container image, or code that extracts a bundled file at startup. Record the package name, exact version, layer version or image digest, and the target architecture stated by that artifact’s documentation.
  3. Inspect the actual executable. In the build environment that produced the artifact, run commands such as file chromium and readelf -h chromium. Look for the machine type: an x86-64 build is not interchangeable with an AArch64/ARM64 build. Also inspect native dependencies when your packaging process supplies them; a matching Chromium file can still fail if its required libraries are for another environment.
  4. Align the two sides. If the function is arm64 and the deployed package does not support ARM64, replace it with a compatible build or select an architecture supported by the package you intend to use. If the function is x86_64, use an x86-64-compatible Chromium artifact. Do not treat the historical Sparticuz report as a universal prescription.
  5. Deploy the corrected artifact together with the configuration. Publish the layer, zip, or image that contains the intended binary, update the function to use that exact version, and invoke the newly deployed version. This avoids diagnosing an old layer or stale image while testing a new setting.

Architecture checks you can run before deployment

Run these checks in CI or in the environment where you assemble the Lambda artifact. They do not require launching Puppeteer.

  • uname -m tells you the architecture of the machine performing the check. It describes the checker, not necessarily the binary, so pair it with a file inspection.
  • file chromium identifies the executable format and commonly prints whether it is x86-64 or ARM aarch64.
  • readelf -h chromium exposes the ELF header, including the machine field. This is useful when a wrapper script or compressed package makes the file type unclear.
  • Check every native companion shipped with Chromium, not only the main file. A package can contain a correctly named executable while a required shared object targets another architecture.

If you build a container image, perform the same comparison between the Lambda function architecture, the image’s platform, and the Chromium artifact inside the image. If you use a layer or zip, inspect the copy that is actually uploaded rather than a local cache or an uncompressed development copy.

Choosing between arm64 and x86_64

Lambda setting Artifact requirement What to do when execution fails
arm64 Chromium and native dependencies built for a compatible ARM64 Lambda environment Use a package release that documents this target, or change the function only if the package you selected supports another architecture
x86_64 Chromium and native dependencies built for a compatible x86-64 Lambda environment Replace an ARM-only artifact or select a package release intended for x86-64
Architecture not verified Unknown Stop changing Puppeteer options; identify the function setting and inspect the deployed binary first

The defensible decision is always package-version-specific. Historical issue reports establish that an architecture change fixed one setup, but they do not provide a current compatibility matrix for every Sparticuz Chromium release, Lambda runtime, or packaging method.

When the architectures appear to match

A matching architecture narrows the problem; it does not prove that the deployment is correct. Work through the artifact path in order.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the file that Lambda executes

Confirm that your startup code extracts or references the same file you inspected. Log the resolved path and package version, and check that a layer did not place a different Chromium copy earlier in the search path. The error names /tmp/chromium, so focus on the file at that path in the failing invocation, not merely on a similarly named file in your repository.

Check packaging transformations

Compare the executable before and after compression, extraction, or container-image assembly. A failed extraction can leave a truncated or otherwise invalid file that still exists at the expected path. Rebuild the artifact from a clean directory and redeploy it rather than repeatedly modifying a previously uploaded archive.

Separate local and Lambda environments

A second Sparticuz Chromium issue describes an execution-format failure in local development and discusses the local environment and binary architecture. A binary that works on a developer workstation is not automatically suitable for Lambda, and a local failure does not prove that the Lambda function has the same cause. Test the artifact in an environment that matches the function you deploy.

Do not jump to unrelated fixes

This specific message does not, by itself, establish a network, timeout, permission, or Puppeteer API problem. Investigate those only after the executable format, package target, and deployment path are accounted for. Changing browser launch flags cannot make an incompatible ELF binary executable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common symptoms and targeted fixes

Symptom Likely explanation Targeted action
/tmp/chromium: cannot execute binary file immediately on launch Architecture or executable-format mismatch Compare Lambda architecture with the actual Chromium and native libraries
Changing arm64 to x86_64 fixes one deployment The deployed package in that case was incompatible with ARM64 Keep the change only if it matches the exact package version you intend to support; otherwise obtain a compatible artifact
Local machine works, Lambda fails Different operating system, CPU architecture, or packaging path Inspect the Lambda artifact and test in a matching build environment
The file exists but still will not start Wrong format, damaged extraction, or incompatible native dependency Rebuild cleanly, inspect with file/readelf, and verify companion libraries
Error appears after a layer or image update The deployed version is not the version you inspected Record and verify the layer version or image digest used by the function

A repeatable deployment checklist

  • Write down the Lambda architecture before selecting a Chromium package.
  • Pin the exact Chromium package and layer or image version.
  • Inspect the binary’s ELF machine type and the architecture of native dependencies.
  • Confirm that the uploaded artifact contains the inspected file at the path your code uses.
  • Deploy the function configuration and artifact as one tested change.
  • Invoke the deployed version and retain the resolved path, package version, and architecture in logs.
  • If it fails, reproduce with the smallest launch test before adding application code or changing unrelated settings.

Reliability, performance, and cost considerations

Architecture alignment is a correctness requirement, not a performance benchmark. The available incident reports do not establish a success rate, a universal runtime fix, or a current cost difference between Lambda architectures for Chromium. Choose the architecture that your exact browser package supports and that fits the rest of your deployment.

Keep the artifact deterministic: pin versions, avoid mutable layer references, and verify the binary after every packaging step. This reduces failures caused by silently changing packages or by testing one file while deploying another. If you change architecture, retest the complete function because the browser artifact, native dependencies, and any other compiled extensions must remain compatible together.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is simply to obtain a clean website screenshot rather than to run Chromium inside your own Lambda function, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server lets Claude, Cursor, and other MCP clients call screenshot tools directly.

Use the API documentation at https://screenshotneo.com/docs/ for the available parameters. A minimal cURL request is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same request in Python:

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)

And in 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 capture, element selectors, device and retina settings, PDF output, custom CSS and JavaScript, request blocking, cookies and headers, signed links, asynchronous jobs, bulk capture, caching, and a usage API. Every feature is on every plan: 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Frequently Asked Questions

Will renaming the Chromium file fix this error?

No. The filename and location do not change the executable format or its CPU architecture.

Does this error prove that my Puppeteer version is wrong?

No. Check the Lambda architecture and deployed Chromium artifact first; the message occurs at executable startup.

Should every Lambda Chromium function use x86_64?

No. The documented arm64-to-x86_64 fix applies to one historical package setup. Verify support for the exact release you deploy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I record for a support request?

Include the Lambda architecture, package and layer or image versions, the path executed, and the output of binary-format checks from the artifact you uploaded.

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.