From 325d86881c789e1ff018e56f33915145c2faeb04 Mon Sep 17 00:00:00 2001 From: Alexander Zagaynov Date: Thu, 17 Oct 2019 14:44:13 +0200 Subject: [PATCH] require specific aws gems --- app/models/file_depot_s3.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/file_depot_s3.rb b/app/models/file_depot_s3.rb index 9db4680e8de..bef7bed40e5 100644 --- a/app/models/file_depot_s3.rb +++ b/app/models/file_depot_s3.rb @@ -10,7 +10,8 @@ def self.validate_settings(settings) end def connect(options = {}) - require 'aws-sdk' + require 'aws-sdk-s3' + username = options[:username] || authentication_userid(options[:auth_type]) password = options[:password] || authentication_password(options[:auth_type]) # Note: The hard-coded aws_region will be removed after manageiq-ui-class implements region selection @@ -62,7 +63,8 @@ def connection_rescue_block end def translate_exception(err) - require 'aws-sdk' + require 'aws-sdk-ec2' + case err when Aws::EC2::Errors::SignatureDoesNotMatch MiqException::MiqHostError.new("SignatureMismatch - check your AWS Secret Access Key and signing method")