Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): support aws session token #530

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/iceberg/src/io/storage_s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub const S3_ENDPOINT: &str = "s3.endpoint";
pub const S3_ACCESS_KEY_ID: &str = "s3.access-key-id";
/// S3 secret access key.
pub const S3_SECRET_ACCESS_KEY: &str = "s3.secret-access-key";
/// S3 session token.
/// This is required when using temporary credentials.
pub const S3_SESSION_TOKEN: &str = "s3.session-token";
/// S3 region.
pub const S3_REGION: &str = "s3.region";
/// S3 Path Style Access.
Expand All @@ -56,6 +59,9 @@ pub(crate) fn s3_config_parse(mut m: HashMap<String, String>) -> Result<S3Config
if let Some(secret_access_key) = m.remove(S3_SECRET_ACCESS_KEY) {
cfg.secret_access_key = Some(secret_access_key);
};
if let Some(session_token) = m.remove(S3_SESSION_TOKEN) {
cfg.session_token = Some(session_token);
};
if let Some(region) = m.remove(S3_REGION) {
cfg.region = Some(region);
};
Expand Down
Loading