Q:

Using Authentication Signature v4 in aws SDK

I am creating EC2 Instances using AWS PHP SDK. When I try to create an instance in Frankfurt region the API gives me authentication error as this region supports v4 signature service.
When I try to provide 'signature' => 'v4' parameters to client factory method, I get this error 
Fatal error: Call to a member function signRequest() on a non-object in \Aws\Common\Signature\SignatureListener.php on line 78

Any suggestions on what's the correct method to use signature v4. Currently I'm using this code.
Aws::factory(array(
   'key' => $this->key,
   'secret' => $this->secret,
   'region' => $region,
   'signature' => 'v4')
   )->get($service, true);

A:

Finally got it to work, basically we have to provide an Aws\Common\Signature\SignatureV4 Instance in the client factory.
'signature' => new SignatureV4()

