diff --git a/cpp/src/arrow/filesystem/s3_internal.h b/cpp/src/arrow/filesystem/s3_internal.h index 85425b126012a..2b746c199b1a0 100644 --- a/cpp/src/arrow/filesystem/s3_internal.h +++ b/cpp/src/arrow/filesystem/s3_internal.h @@ -320,6 +320,9 @@ inline Result CalculateSSECustomerKeyMD5( template Status SetSSECustomerKey(S3RequestType& request, const std::string& sse_customer_key) { +#ifndef ARROW_S3_SUPPORT_SSEC + return Status::NotImplemented("SSE-C is not supported"); +#endif if (sse_customer_key.empty()) { return Status::OK(); // do nothing if the sse_customer_key is not configured } diff --git a/cpp/src/arrow/filesystem/s3fs.cc b/cpp/src/arrow/filesystem/s3fs.cc index bb76fd797b4b7..aea17581ecdf5 100644 --- a/cpp/src/arrow/filesystem/s3fs.cc +++ b/cpp/src/arrow/filesystem/s3fs.cc @@ -105,6 +105,10 @@ # define ARROW_S3_HAS_S3CLIENT_CONFIGURATION #endif +#if ARROW_AWS_SDK_VERSION_CHECK(1, 9, 201) +# define ARROW_S3_SUPPORT_SSEC +#endif + #ifdef ARROW_S3_HAS_CRT # include # include