FIX: Pass all necessary options in `migrate_to_s3` rake task.

FIX: Pass all necessary options in migrate_to_s3 rake task.

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index b722d1c..73f0b33 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -244,11 +244,7 @@ def migrate_to_s3
     exit 3
   end
 
-  s3 = Aws::S3::Client.new(
-    region: GlobalSetting.s3_region,
-    access_key_id: GlobalSetting.s3_access_key_id,
-    secret_access_key: GlobalSetting.s3_secret_access_key,
-  )
+  s3 = Aws::S3::Client.new(S3Helper.s3_options(GlobalSetting))
 
   begin
     s3.head_bucket(bucket: GlobalSetting.s3_bucket)

GitHub
sha: 9e508132

3 Likes