feat(integ): add S3 integration tests for media blocks#461
Draft
feat(integ): add S3 integration tests for media blocks#461
Conversation
- Add @aws-sdk/client-s3 and @aws-sdk/client-sts as dev dependencies - Add blue.mp4 video file for video S3 location testing - Create s3-test-helper.ts with utilities for S3 bucket setup and file upload - Update vitest.d.ts with S3 resources context type - Update global setup to upload test files to S3 and provide URIs via inject() - Add integration tests for image, document, and video from S3 locations - Tests skip gracefully when AWS credentials unavailable
dbschmigelski
pushed a commit
to dbschmigelski/sdk-typescript
that referenced
this pull request
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The SDK's media block types (ImageBlock, DocumentBlock, VideoBlock) support S3 location sources, but this functionality lacked integration test coverage. Without S3 integration tests, regressions in S3 location handling could go undetected in CI.
This PR adds integration tests that validate media blocks can be loaded from S3 sources, following the pattern established in the Python SDK (PR #1572).
Resolves #180
Public API Changes
No public API changes. This PR adds integration test infrastructure only.
Implementation Approach
The tests use Vitest's
inject()pattern to share S3 URIs across test files:strands-integ-tests-resources-{accountId})inject('s3-resources')for use in any test fileS3 Bucket Strategy (from Python SDK)
strands-integ-tests-resources-{accountId}us-west-2Test Coverage
Tests validate that Bedrock can process media from S3 locations: