:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(replay-recorder-v4): connect the aws clients without the egress proxy (#123318)
Nicholas Waltz0b02d9152b80
diff --git a/rust/Cargo.lock b/rust/Cargo.lockindex 3229a54de865..bf40604bad21 100644--- a/rust/Cargo.lock+++ b/rust/Cargo.lock@@ -11071,6 +11071,7 @@ dependencies = ["aws-sdk-dynamodb","aws-sdk-kms","aws-sdk-s3",+ "aws-smithy-http-client","axum 0.7.9","base64 0.22.1","brotlic",diff --git a/rust/ai-research/replay-recorder-v4/Cargo.toml b/rust/ai-research/replay-recorder-v4/Cargo.tomlindex 850ec63e079e..d10574b8ab99 100644--- a/rust/ai-research/replay-recorder-v4/Cargo.toml+++ b/rust/ai-research/replay-recorder-v4/Cargo.toml@@ -26,6 +26,7 @@ aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }aws-sdk-kms = { workspace = true }aws-sdk-s3 = { workspace = true }+aws-smithy-http-client = { workspace = true }axum = { workspace = true }brotlic = "0.8"chrono = { workspace = true }diff --git a/rust/ai-research/replay-recorder-v4/src/main.rs b/rust/ai-research/replay-recorder-v4/src/main.rsindex 5110d7a9d44f..a2fbb6a726ec 100644--- a/rust/ai-research/replay-recorder-v4/src/main.rs+++ b/rust/ai-research/replay-recorder-v4/src/main.rs@@ -175,7 +175,16 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {.then(|| config.kafka_topic.clone()),};let writer = if let Some((producer_handle, index_producer_handle)) = producer_handles {+ // The SDK's default HTTP client reads HTTPS_PROXY, which would send every S3, KMS and DynamoDB call through the+ // egress proxy. A client built here reads no proxy settings, so only these AWS clients connect directly. Every+ // other HTTP path in the process still uses the proxy.+ let aws_http_client = aws_smithy_http_client::Builder::new()+ .tls_provider(aws_smithy_http_client::tls::Provider::Rustls(+ aws_smithy_http_client::tls::rustls_provider::CryptoMode::AwsLc,+ ))+ .build_https();let aws = aws_config::defaults(aws_config::BehaviorVersion::latest())+ .http_client(aws_http_client).load().await;// The cache lifetimes are v3's: a session row's lifetime bounds how late a deletion is seen.