Skip to content

aws-sdk v3: rebuild clients on configuration.update, drop direct @smithy imports - #230

Draft
czirker wants to merge 1 commit into
masterfrom
fix/aws-sdk-v3-config-update
Draft

czirker wants to merge 1 commit into
masterfrom
fix/aws-sdk-v3-config-update

Conversation

@czirker

@czirker czirker commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • configuration.update() called v2's service.config.update, which v3 clients don't have, so any bot that calls it (bus-api, firehose_processor, s3-load-trigger) crashed at load. The DynamoDB, Kinesis, Firehose and S3 clients are now rebuilt when region or credentials actually change. leo.aws.s3/kinesis/firehose are getters, so callers get the current client.
  • The Lambda runtime only exposes @aws-sdk/* to function code. Bundles that leave the SDK to the runtime failed with Cannot find module '@smithy/node-http-handler'. requestHandler is now a plain options object, which the clients turn into a NodeHttpHandler themselves.

Testing

  • 301 unit tests pass.
  • Published as leo-sdk@7.1.22-awsv3node26.0 (dist-tag awsv3node26; latest unchanged) and deployed in leo-bus 4.0.0 on nodejs26.x to the ClintTestBus test stack. bus-api (Kinesis, firehose and S3 write paths, read, checkpoint), the firehose → S3 load trigger → firehose processor chain, the install custom resource, cron and monitor all ran with no errors.

Before merge

  • Release a final version. Don't push a v7.1.22-awsv3node26.0 git tag: the publish workflow strips the prerelease suffix and would publish plain 7.1.22 to latest.

🤖 Generated with Claude Code

…mithy imports

configuration.update() called v2's service.config.update, which v3 clients
don't have, so any bot calling it crashed at load. Clients are now rebuilt
when region or credentials actually change.

The Lambda runtime only exposes @aws-sdk/* to function code, so bundles that
leave the SDK to the runtime failed with "Cannot find module
'@smithy/node-http-handler'". requestHandler is now passed as a plain options
object, which the clients turn into a NodeHttpHandler themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ch-snyk-sa

ch-snyk-sa commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants