Skip to content

initial refactor to remove mediastore client in favor of BucketStore (untested) - #34

Merged
joannekoch merged 3 commits into
mainfrom
remove-mediastore-client
Apr 21, 2026
Merged

initial refactor to remove mediastore client in favor of BucketStore (untested)#34
joannekoch merged 3 commits into
mainfrom
remove-mediastore-client

Conversation

@joefutrelle

Copy link
Copy Markdown
Contributor

This pull request refactors how storage configuration is handled across the codebase by centralizing all S3 and store-related environment variable management into the get_store() utility function. This removes the need to pass storage credentials and configuration throughout the code, simplifying service and command implementations and improving maintainability. The code now supports S3-based storage via amplify-storage-utils BucketStore class, and eliminates the previous dependency on MediaStore.

Storage Refactoring and Centralization:

  • All usages of get_store() across management commands, services, and views have been refactored to no longer require passing URL, TOKEN, or MEDIASTORE_PREFIX parameters. These are now read from environment variables directly within get_store(). [1] [2] [3] [4] [5] [6] [7] [8]

  • All get_store() calls in commands, services, and views have been updated to use the new signature, further simplifying the code and reducing duplication of environment variable handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

S3 Storage Integration:

  • The get_store() utility now supports S3 storage using boto3 and the BucketStore class, reading all required S3 configuration from environment variables. Use of the MediaStore has been removed. [1] [2]

Code Cleanup:

  • Unused imports and redundant environment variable assignments have been removed from several files, making the code cleaner and easier to maintain. [1] [2] [3]

These changes modernize the storage backend configuration, reduce boilerplate, and make it easier to switch storage backends in the future.

@joefutrelle
joefutrelle requested a review from joannekoch April 21, 2026 17:54

@joannekoch joannekoch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joannekoch
joannekoch merged commit 7759c26 into main Apr 21, 2026
1 check passed
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