setConfig($config) ->setConfigDefaults(array( Options::VERSION => self::LATEST_API_VERSION, Options::SERVICE_DESCRIPTION => __DIR__ . '/Resources/sqs-%s.php' )) ->build(); $client->addSubscriber(new QueueUrlListener()); $client->addSubscriber(new Md5ValidatorListener()); return $client; } /** * Converts a queue URL into a queue ARN. * * @param string $queueUrl The queue URL to perform the action on. Retrieved when the queue is first created. * * @return string An ARN representation of the queue URL. */ public function getQueueArn($queueUrl) { return strtr($queueUrl, array( 'http://' => 'arn:aws:', 'https://' => 'arn:aws:', '.amazonaws.com' => '', '/' => ':', '.' => ':', )); } }