So here's my code:

Zend_Service_Amazon_Ec2_Ebs::setRegion('us-east-1');
$ec2Instance = new Zend_Service_Amazon_Ec2_Instance('Access Key ID',
'Secret Access Key');
$return =       $ec2Instance->run(
                                array(
                                        'imageId'               =>      'ami',
                                        'keyName'       =>      'key name',
                                        'securityGroup' =>      'group name',
                                        'userData'              =>      
'someData=some value|someOtherData=some other value'
                                )
                        );

What I get back is:

Fatal error:  Uncaught exception 'Zend_Service_Amazon_Ec2_Exception'
with 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.' in
/zend_framework/Zend_1.9.4/Zend/Service/Amazon/Ec2/Abstract.php:196
Stack trace:
#0 /zend_framework/Zend_1.9.4/Zend/Service/Amazon/Ec2/Abstract.php(99):
Zend_Service_Amazon_Ec2_Abstract->checkForErrors(Object(Zend_Service_Amazon_Ec2_Response))
#1 /zend_framework/Zend_1.9.4/Zend/Service/Amazon/Ec2/Instance.php(169):
Zend_Service_Amazon_Ec2_Abstract->sendRequest(Array)
#2 /Users/mark/Zend/workspaces/DefaultWorkspace7/Vagabond/public/aws.php(41):
Zend_Service_Amazon_Ec2_Instance->run(Array)
#3 {main}
  thrown in <b>/zend_framework/Zend_1.9.4/Zend/Service/Amazon/Ec2/Abstract.php
on line <b>196


It doesn't make sense. I copied the keys from the Security Credentials
page. I made sure there was no extra white space. I even tried
creating a new access key and got the same thing.

Any ideas?



Mark

-- 
Have fun or die trying - but try not to actually die.

Reply via email to