AWS extensions fail to load: missing _lib/aws.ts shared dependency
Opened by swampadmin · 10/29/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
- Initialize a fresh swamp repo:
swamp init - Pull any AWS extension:
swamp extension pull @swamp/aws/ecs - 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.tsfiles importcreateResource,deleteResource,readResource,updateResource, andisResourceNotFoundErrorfrom./_lib/aws.ts - This
_lib/aws.tsfile 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 pulldownloads the package - The pre-compiled
.swamp/bundles/*.jsfiles DO contain the inlined_lib/aws.tscode, but swamp attempts to re-bundle from.tssource 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)
Closed
No activity in this phase yet.
Sign in to post a ripple.