Expand description
§object_store_aws
AWS extensions for object_store crate based on AWS SDK
It provides credentials source and optional HTTP client based on SDK’s http client
§Features
sso- Enables SSO usage in aws-configring- Enables ring crypto backend for AWS HTTP clientaws-lc- Enables aws-lc crypto backend for AWS HTTP clientaws-lc-fips- Enables aws-lc FIPS friendly crypto backend for AWS HTTP client
§Usage
use core::fmt;
use std::sync::Arc;
use object_store_aws::{object_store, init, AmazonS3Builder};
use object_store_aws::object_store::ObjectStore;
use object_store_aws::object_store::multipart::MultipartStore;
async fn create_s3_store() -> impl ObjectStore + MultipartStore + fmt::Debug + Send + Sync + Clone + 'static {
let credentials = Arc::new(init(None).await.expect("to initialize S3 SDK"));
AmazonS3Builder::from_env().with_bucket_name("my-super-bucket")
.with_region(credentials.region_str())
.with_credentials(credentials).build()
.expect("to create S3 store")
}Re-exports§
pub use object_store;pub use aws_config;
Modules§
- http
- HTTP client based on aws-smithy-http-client
Structs§
- Amazon
S3Builder - Configure a connection to Amazon S3 using the specified credentials in the specified Amazon region and bucket.
- AwsCredentials
- AWS credentials provided by aws-config
Enums§
- Credentials
Error - Error returned when credentials failed to load.
- Error
- Credential errors
Functions§
- init
- Initializes AwsCredentials using current environment