CustomDeploymentDirectory in AWS Lambda
When you run IronPDF in an AWS Lambda function under Docker, you may try to point CustomDeploymentDirectory at a writable temporary path like /tmp. Doing so can produce a misleading log line about a failed binary lookup, yet PDF rendering keeps working normally.
Attempting deployment for 'Pdfium' using '/tmp/'
Failed to locate assembly(s) for deployment '/tmp/' at path '/tmp/'
Successfully located 'IronPdfInterop' at '/var/task'
The message looks like a failure, but it is informational. IronPDF prefers assemblies that are already deployed and only consults the custom path as a fallback. In Lambda, your Docker container's working directory is usually /var/task, where the binaries already live, so IronPDF finds them there and proceeds.
CustomDeploymentDirectory serves two roles: a directory to download and deploy native components such as IronPdf.Native.Chrome.Linux, and an alternative lookup path for runtime dependencies that are not found in the standard locations. Because the engine favors already-deployed binaries, the /tmp path is unnecessary unless you depend on IronPdf.Slim or on runtime NuGet downloads of the native binaries.
Solution
Option 1: Standard IronPdf.Linux deployment
For most Lambda plus Docker deployments using IronPdf.Linux, the simplest and most reliable setup skips the custom directory entirely:
IronPdf.Installation.AutomaticallyDownloadNativeBinaries = false;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = false;
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
IronPdf.Installation.SingleProcess = true;
IronPdf.Installation.AutomaticallyDownloadNativeBinaries = false;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = false;
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
IronPdf.Installation.SingleProcess = true;
Imports IronPdf
Installation.AutomaticallyDownloadNativeBinaries = False
Installation.LinuxAndDockerDependenciesAutoConfig = False
Installation.ChromeGpuMode = Engines.Chrome.ChromeGpuModes.Disabled
Installation.SingleProcess = True
Disabling the automatic downloads tells IronPDF the native binaries are already packaged, and SingleProcess keeps the engine in one process, which suits the constrained Lambda runtime.
Option 2: IronPdf.Slim deployment
If you ship IronPdf.Slim with Docker, route IronPDF's temporary and deployment paths to /tmp, the only writable directory in Lambda:
var awsTmpPath = @"/tmp/"; // AWS temporary storage path
// Configuration for IronPDF rendering
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
IronPdf.Installation.DefaultRenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome;
Environment.SetEnvironmentVariable("TEMP", awsTmpPath, EnvironmentVariableTarget.Process);
Environment.SetEnvironmentVariable("TMP", awsTmpPath, EnvironmentVariableTarget.Process);
IronPdf.Installation.TempFolderPath = awsTmpPath;
IronPdf.Installation.CustomDeploymentDirectory = awsTmpPath;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = true;
var awsTmpPath = @"/tmp/"; // AWS temporary storage path
// Configuration for IronPDF rendering
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
IronPdf.Installation.DefaultRenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome;
Environment.SetEnvironmentVariable("TEMP", awsTmpPath, EnvironmentVariableTarget.Process);
Environment.SetEnvironmentVariable("TMP", awsTmpPath, EnvironmentVariableTarget.Process);
IronPdf.Installation.TempFolderPath = awsTmpPath;
IronPdf.Installation.CustomDeploymentDirectory = awsTmpPath;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = true;
Imports IronPdf
Dim awsTmpPath As String = "/tmp/" ' AWS temporary storage path
' Configuration for IronPDF rendering
Installation.ChromeGpuMode = Engines.Chrome.ChromeGpuModes.Disabled
Installation.DefaultRenderingEngine = Rendering.PdfRenderingEngine.Chrome
Environment.SetEnvironmentVariable("TEMP", awsTmpPath, EnvironmentVariableTarget.Process)
Environment.SetEnvironmentVariable("TMP", awsTmpPath, EnvironmentVariableTarget.Process)
Installation.TempFolderPath = awsTmpPath
Installation.CustomDeploymentDirectory = awsTmpPath
Installation.LinuxAndDockerDependenciesAutoConfig = True
Here CustomDeploymentDirectory earns its place: the Slim package downloads native components at runtime, and /tmp gives them a writable home. Enabling LinuxAndDockerDependenciesAutoConfig lets IronPDF set up the Linux dependencies on first run.
When to Set It
- Leave it unset when: you package IronPDF dependencies such as
IronPdf.Linuxwith your project, use full deployments without runtime downloads, and the function can reach everything from/var/task. - Set it to
/tmpwhen: you useIronPdf.Slimwithout bundled native binaries, rely on runtime NuGet downloads for components likeIronPdf.Native.Chrome.Linux, or need temporary deployments stored in Lambda's only writable directory.

