Skip to content
Latchkey

Pulumi "failed to load plugin" in CI

Pulumi found a provider plugin binary but could not launch it. Unlike "no resource plugin found", the file exists; it fails to run because it is for the wrong platform, corrupted, or incompatible with the CLI.

What this error means

A Pulumi step fails with "error: failed to load plugin" or "could not read plugin ... : fork/exec ... : exec format error" during preview or update.

pulumi
error: failed to load plugin for aws provider:
fork/exec /root/.pulumi/plugins/resource-aws-v6.0.0/pulumi-resource-aws:
exec format error

Common causes

A cached plugin built for another architecture

A plugin cache restored from an x86 runner onto an arm64 runner (or vice versa) contains a binary the current CPU cannot execute.

A corrupted or partial plugin download

A truncated plugin download leaves an unrunnable binary that fails to load.

How to fix it

Reinstall the plugin for this runner

  1. Remove the bad cached plugin.
  2. Reinstall the provider so a matching binary is fetched.
  3. Re-run the command.
Terminal
pulumi plugin rm resource aws --yes
pulumi plugin install resource aws v6.0.0

Key the plugin cache by architecture

Include the runner OS and architecture in the cache key so x86 and arm64 plugins never mix.

.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: ~/.pulumi/plugins
    key: pulumi-plugins-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/package-lock.json') }}

How to prevent it

  • Include OS and arch in the plugin cache key.
  • Reinstall plugins after a failed or partial download.
  • Keep the Pulumi CLI and provider versions compatible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →