From 92b20e844696a49dc93c0cdbf59c8b147c111c74 Mon Sep 17 00:00:00 2001 From: Jackson Newhouse Date: Mon, 27 Nov 2023 18:10:37 -0800 Subject: [PATCH] Pass AWS Token to Delta Lake if present. --- arroyo-worker/src/connectors/filesystem/delta.rs | 3 +++ arroyo-worker/src/connectors/kafka/sink/test.rs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arroyo-worker/src/connectors/filesystem/delta.rs b/arroyo-worker/src/connectors/filesystem/delta.rs index 63946841a..6e62aaf4f 100644 --- a/arroyo-worker/src/connectors/filesystem/delta.rs +++ b/arroyo-worker/src/connectors/filesystem/delta.rs @@ -104,6 +104,9 @@ async fn update_s3_credentials(options: &mut HashMap) -> Result< AmazonS3ConfigKey::SecretAccessKey.as_ref().to_string(), tmp_credentials.secret_key.clone(), ); + if let Some(token) = tmp_credentials.token.as_ref() { + options.insert(AmazonS3ConfigKey::Token.as_ref().to_string(), token.clone()); + } } options.insert(AWS_S3_ALLOW_UNSAFE_RENAME.to_string(), "true".to_string()); Ok(()) diff --git a/arroyo-worker/src/connectors/kafka/sink/test.rs b/arroyo-worker/src/connectors/kafka/sink/test.rs index 475766a04..e743807bf 100644 --- a/arroyo-worker/src/connectors/kafka/sink/test.rs +++ b/arroyo-worker/src/connectors/kafka/sink/test.rs @@ -1,6 +1,5 @@ #![allow(clippy::unnecessary_mut_passed)] -use std::io::Write; use std::time::{Duration, SystemTime}; use crate::engine::{Context, OutQueue};