feldera_types/transport/s3.rs
1use serde::{Deserialize, Serialize};
2use utoipa::ToSchema;
3
4fn default_max_concurrent_fetches() -> u32 {
5 8
6}
7
8/// Configuration for reading data from AWS S3.
9#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
10pub struct S3InputConfig {
11 /// AWS Access Key id. This property must be specified unless `no_sign_request` is set to `true`.
12 pub aws_access_key_id: Option<String>,
13
14 /// Secret Access Key. This property must be specified unless `no_sign_request` is set to `true`.
15 pub aws_secret_access_key: Option<String>,
16
17 /// Do not sign requests. This is equivalent to the `--no-sign-request` flag in the AWS CLI.
18 #[serde(default)]
19 pub no_sign_request: bool,
20
21 /// Read a single object specified by a key.
22 pub key: Option<String>,
23
24 /// Read all objects whose keys match a prefix. Set to an empty string to read all objects in the bucket.
25 pub prefix: Option<String>,
26
27 /// AWS region.
28 pub region: String,
29
30 /// S3 bucket name to access.
31 pub bucket_name: String,
32
33 /// The endpoint URL used to communicate with this service. Can be used to make this connector
34 /// talk to non-AWS services with an S3 API.
35 pub endpoint_url: Option<String>,
36
37 /// Controls the number of S3 objects fetched in parallel.
38 ///
39 /// Increasing this value can improve throughput by enabling greater concurrency.
40 /// However, higher concurrency may lead to timeouts or increased memory usage due to in-memory buffering.
41 ///
42 /// Recommended range: 1–10. Default: 8.
43 #[serde(default = "default_max_concurrent_fetches")]
44 pub max_concurrent_fetches: u32,
45}