Developer at Blackfire.io
@symfony core team
@jderusse
@jderusse
@Nyholm
composer req async-aws/sqs
composer req async-aws/s3
composer req async-aws/ses
/**
* Creates a new standard or FIFO queue. You can pass one or more attributes in the request.
* Keep the following in mind:.
*
* @see https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html
* @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sqs-2012-11-05.html#createqueue
*
* @param array{
* QueueName: string,
* Attributes?: array<QueueAttributeName::*, string>,
* tags?: array<string, string>,
* @region?: string,
* }|CreateQueueRequest $input
*/
public function createQueue($input): CreateQueueResult
{
$input = CreateQueueRequest::create($input);
$response = $this->getResponse(
$input->request(),
new RequestContext(['operation' => 'CreateQueue', 'region' => $input->getRegion()])
);
return new CreateQueueResult($response);
}
/**
* aws/aws-sdk-php
*
* @method \Aws\Result createQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueAsync(array $args = [])
*/
// pagination
$queues = $sqs->listQueues();
foreach ($queues as $queue) {
// ...
}
// async
$file = $s3->getObject([
'Bucket' => 'my.bucket',
'Key' => 'file-' . uniqid('file-', true),
]);
$this->doSomethingElse();
$this->save($file->getBody());
@jderusse
slides