Skip to main content
← Back to list
01Issue
FeatureShippedExtensions
Assigneesstack72

Relationships

#803 Datastore should fail fast on unresolvable credentials instead of stalling on the AWS provider chain

Opened by mgreten · 6/24/2026· Shipped 6/24/2026

When @swamp/s3-datastore runs with no resolvable AWS credentials (no AWS_PROFILE, no default profile, no static env creds), the AWS SDK provider chain doesn't fail quickly — it falls through SSO token resolution to the EC2 IMDS endpoint (169.254.169.254). Off-EC2, that's either a fast-fail (~2s, when an expired SSO token short-circuits it) or a long stall (tens of seconds, IMDS connect-timeout × the sync layer's 30s request timeout × 3× retry backoff).

Measured, same machine back-to-back: profile pinned → datastore status healthy in ~22ms; no profile → CredentialsProviderError after 2011ms (fast path), with much longer stalls observed when no token is cached.

The stall is the harmful case: a push/sync that overruns a caller's command timeout gets SIGKILL'd mid-hold, which orphans the datastore lock (the #218 / #666 orphan path) and degrades concurrency for everyone.

Proposed: a short, bounded credential preflight before any S3 op (e.g. ≤2–3s for the whole chain) that aborts with an actionable error if creds don't resolve; and, when not on EC2, skip or sub-second-cap the IMDS provider (e.g. set AWS_EC2_METADATA_DISABLED internally) so off-EC2 hosts never eat the multi-minute hang. Fast, loud failure means the process exits before a timeout-SIGKILL can orphan a lock.

Relates to #666 (lock contention) and #218 (orphan loop) — this removes one trigger that feeds both.

Upstream repository: https://github.com/systeminit/swamp-extensions

Environment

  • Extension: @swamp/s3-datastore@2026.06.03.2
  • swamp: 20260617.212026.0-sha.396e0952
  • OS: darwin (aarch64)
  • Deno: 2.8.3
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

6/24/2026, 10:46:43 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/24/2026, 6:39:29 PM
Editable. Press Enter to edit.

stack72 commented 6/24/2026, 10:47:02 PM

Thanks @mgreten for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

stack72 commented 6/24/2026, 10:47:28 PM

@mgreten new versions of the datastore extension has this new functionality

mgreten commented 6/25/2026, 3:54:39 AM

you are amazing! Thank you!

Sign in to post a ripple.