Skip to main content
← Back to list
01Issue
BugClosedSwamp Club
AssigneesNone

AWS extensions fail to load: missing _lib/aws.ts shared dependency

Opened by swampadmin · 10/8/2025

Description

When pulling any @swamp/aws/* extension (e.g., @swamp/aws/ecs, @swamp/aws/iam, @swamp/aws/rds, @swamp/aws/dynamodb), the model types fail to load because all AWS extension .ts source files import from ./_lib/aws.ts, but this shared library file is not included in any extension package.

Steps to Reproduce

  1. Initialize a fresh swamp repo: swamp init
  2. Pull any AWS extension: swamp extension pull @swamp/aws/ecs
  3. Try to use the models: swamp model type search ecs

Expected: Model types are found and usable.

Actual: Every model fails to load with:

Warning: Failed to load user model cluster.ts: Error: deno bundle failed
error: Module not found "file:///path/to/extensions/models/_lib/aws.ts"

swamp model type search ecs returns no results.

Analysis

  • Each @swamp/aws/* extension's .ts files import createResource, deleteResource, readResource, updateResource, and isResourceNotFoundError from ./_lib/aws.ts
  • This _lib/aws.ts file is a shared helper wrapping AWS CloudControl API (@aws-sdk/client-cloudcontrol) with retry logic, polling, and error handling
  • The file exists in the "clover" build system that generates these extensions, but is not shipped when swamp extension pull downloads the package
  • The pre-compiled .swamp/bundles/*.js files DO contain the inlined _lib/aws.ts code, but swamp attempts to re-bundle from .ts source and fails before falling back to bundles

Suggested Fix

The _lib/aws.ts shared dependency should be included as part of the extension package when any @swamp/aws/* extension is pulled. Alternatively, swamp's model loader could prefer pre-compiled bundles in .swamp/bundles/ when they exist, skipping .ts re-compilation.

Environment

  • swamp version: 20260315.010849.0-sha.5a9897f6
  • Platform: macOS Darwin 25.3.0
  • Extensions tested: @swamp/aws/ecs, @swamp/aws/dynamodb, @swamp/aws/rds, @swamp/aws/iam (all version 2026.03.10.5)
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.