mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Disable loading EC2-metadata.
This commit is contained in:
parent
f8f598e298
commit
1eb0d5db16
2
contrib/aws
vendored
2
contrib/aws
vendored
@ -1 +1 @@
|
||||
Subproject commit 94a1629472778e3b5c5c08866eaf95ea77cbc336
|
||||
Subproject commit e15b0695c5b3c0f8dc15c89b5e7eb73b2747fdec
|
@ -677,6 +677,12 @@ namespace S3
|
||||
ClientFactory::ClientFactory()
|
||||
{
|
||||
aws_options = Aws::SDKOptions{};
|
||||
|
||||
/// We don't load EC2 metadata.
|
||||
/// This is needed to allow to subclass `ClientConfiguration` so that any possible SDK client will use extended configuration
|
||||
/// without circular dependencies `Client` -> `ClientConfiguration` -> `Client`.
|
||||
setenv("AWS_EC2_METADATA_DISABLED", "true", 1/*override*/); // NOLINT(concurrency-mt-unsafe): this is safe if not called concurrently
|
||||
|
||||
Aws::InitAPI(aws_options);
|
||||
Aws::Utils::Logging::InitializeAWSLogging(std::make_shared<AWSLogger>(false));
|
||||
Aws::Http::SetHttpClientFactory(std::make_shared<PocoHTTPClientFactory>());
|
||||
|
Loading…
Reference in New Issue
Block a user