For the complete documentation index, see llms.txt. This page is also available as Markdown.
AWS S3
Description
AWS S3 can be used as the backing implementation for Flex file operations. Your application code should depend on IFlexFileStore, while Flex provides the provider bridge and wiring.
Important concepts
IFlexFileStore is the contract: app code uploads/downloads using the shared interface rather than AWS SDK types.
Files are streamed: uploads use a Stream; downloads return a Stream? (when a file doesn’t exist, you should handle null).
Provider bridge: the AWS implementation is exposed via an IFlexFileStoreBridge internally, but most consumers only need IFlexFileStore.
Configuration in DI
Add the provider in your DI composition root (commonly in EndPoints/...CommonConfigs/OtherApplicationServicesConfig.cs or wherever you centralize registrations).
// using Sumeru.Flex; // IFlexFileStorepublicstaticclassOtherApplicationServicesConfig{publicstaticIServiceCollectionAddOtherApplicationServices(thisIServiceCollectionservices,IConfigurationconfiguration){ // Registers AWS S3 as the IFlexFileStore bridge. // Flex auto-wires generated Queries/Handlers that *use* IFlexFileStore.services.AddFlexAwsS3FileStore(configuration);returnservices;}}
appsettings.json
Configuration is read from FlexBase:DataStores:File:AwsS3.
Examples (template-based)
These examples mirror the generated Query and PostBusHandler templates. You do not register these types manually—Flex discovers and wires generated Queries/Handlers automatically.