Subject: | SignatureDoesNotMatch bug with UserData |
Date: | Sun, 17 Jun 2012 22:41:47 +0100 |
To: | bug-Net-Amazon-EC2 [...] rt.cpan.org |
From: | Andrew Solomon <andrew [...] illywhacker.net> |
Hi Mark (and Jeff)
Firstly - thanks so much for this module. It's a nice example of
making hard things possible!
Now I seem to have stumbled on a bug but unfortunately not a fix.
* Distribution: Net::Amazon::EC2
* Version: 0.18
* Perl version:
This is perl 5, version 14, subversion 2 (v5.14.2) built for
i686-linux-gnu-thread-multi-64int
(with 53 registered patches, see perl -V for more detail)
* Operating System vendor and version (Find this by running the
command uname -a)
Linux ip-10-229-77-105 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10
23:58:38 UTC 2012 i686 i686 i386 GNU/Linux
* Issue:
- When I call run_instances it's fine until I add the UserData
parameter. At this point I get the output below.
The encode_base64 output I'm using for the UserData parameter is
IyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl
cm1vZC5vdXQKCg==
(is it a problem it contains a newline?)
It is generated with
my $user_data =
encode_base64(
'#!/bin/bash
usermod -p myFTLFA2Xt3/6 student &> /tmp/usermod.out
');
- When I paste the base64 userdata above into
https://console.aws.amazon.com when creating an instance, it works
fine.
Kind regards,
Andrew
QUERY TO SIGN: ActionRunInstancesAWSAccessKeyIdAKIAJEMH4OBQC5OFJONQBlockDeviceMapping.DeviceName/dev/sdfBlockDeviceMapping.Ebs.SnapshotIdsnap-fceda597BlockDeviceMapping.Ebs.VolumeSize1ImageIdami-41faff35InstanceTypet1.microMaxCount1MinCount1SecurityGroupquicklaunch-1SignatureVersion1Timestamp2012-06-17T21:14:00.000ZUserDataIyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl
cm1vZC5vdXQKCg==
Version2011-01-01
GENERATED QUERY URL: http://eu-west-1.ec2.amazonaws.com
$VAR1 = {
'RequestID' => 'a2cbd386-4c91-445b-bc27-070abfb0cdc3',
'Errors' => [
{
'Error' => {
'Code' => 'SignatureDoesNotMatch',
'Message' => 'The request signature
we calculated does not match the signature you provided. Check your
AWS Secret Access Key and signing method. Consult the service
documentation for details.'
}
}
]
};
ERROR CODE: SignatureDoesNotMatch MESSAGE: The request signature we
calculated does not match the signature you provided. Check your AWS
Secret Access Key and signing method. Consult the service
documentation for details. FOR REQUEST:
a2cbd386-4c91-445b-bc27-070abfb0cdc3
bless({
errors => [
bless({
code => "SignatureDoesNotMatch",
message => "The request signature we calculated does not match
the signature you provided. Check your AWS Secret Access Key and
signing method. Consult the service documentation for details.",
}, "Net::Amazon::EC2::Error"),
],
request_id => "a2cbd386-4c91-445b-bc27-070abfb0cdc3",
}, "Net::Amazon::EC2::Errors")