From 7d3235c453410ec17e80e8e90db6024043a50e92 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 10 Dec 2018 13:13:08 +0100 Subject: [PATCH] Add region and signature version 4 to fix authentication in eu-central-1 Fixes #35. --- ec2-expire-snapshots | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ec2-expire-snapshots b/ec2-expire-snapshots index 06234e9..84f16cb 100755 --- a/ec2-expire-snapshots +++ b/ec2-expire-snapshots @@ -113,6 +113,8 @@ $Debug and warn "$Prog: Using AWS access key: $aws_access_key_id\n"; my $ec2 = Net::Amazon::EC2->new( ((! $use_iam_role) ? (AWSAccessKeyId => $aws_access_key_id,) : () ), ((! $use_iam_role) ? (SecretAccessKey => $aws_secret_access_key) : () ), + signature_version => 4, + ($region ? (region => $region) : ()), ($ec2_endpoint ? (base_url => $ec2_endpoint) : ()), # ($Debug ? (debug => 1) : ()), );