-
Notifications
You must be signed in to change notification settings - Fork 37
How can I set up region? #60
Comments
This class is defective and hasn't been properly maintained. I found two issues which I needed to extend the class to override myself : (1) SQS::__construct($accessKey = null, $secretKey = null, $region = null) Parent class is Amazon\AbstractAmazon and that constructor specifies (2) The default region is specified by protected property $_sqsEndpoint There is no setter for this endpoint, it is only valid for US East locations. SQS endpoint varies according to region, as in Again I had to override this, by extending SQS class so I could set $_sqsEndpoint to 'sqs.eu-west-1.amazonaws.com' needed for my queues (this would also provide correct endpoint for ListQueues and CreateQueue) This class cannot have been properly tested, and should probably be removed from the Repo until fixed It is unable to supply defaults without the developer breaking apart the code, and noticing the default SQS hostname is used to create Signature incorrectly for non-USA queue reqions. |
This is the sample I extended the SQS service with, to make it usable, maybe help to see how it should connect
|
I added quick fix in https://github.com/Xerkus/ZendService_Amazon/tree/feature/sqs-regions |
$sqs = new Sqs(self::ACCESS_KEY_ID, self::SECRET_KEY, "eu-west-1");
gives
Argument 3 passed to ZendService\Amazon\AbstractAmazon::__construct() must be an instance of Zend\Http\Client, string given, called in .../vendor/zendframework/zendservice-amazon/library/ZendService/Amazon/Sqs/Sqs.php on line 61
error.
Thanks.
The text was updated successfully, but these errors were encountered: