bin/check-s3-object.rb in sensu-plugins-aws-2.1.0 vs bin/check-s3-object.rb in sensu-plugins-aws-2.1.1
- old
+ new
@@ -99,13 +99,11 @@
end
def run
aws_config = {}
if config[:use_iam_role].nil?
- aws_config.merge!(
- access_key_id: config[:aws_access_key],
- secret_access_key: config[:aws_secret_access_key]
- )
+ aws_config[:access_key_id] = config[:aws_access_key]
+ aws_config[:secret_access_key] = config[:aws_secret_access_key]
end
s3 = Aws::S3::Client.new(aws_config.merge!(region: config[:aws_region]))
begin
output = s3.head_object(bucket: config[:bucket_name], key: config[:key_name])