質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,9 @@
|
|
66
66
|
|
67
67
|
23 //QueueAttribute::DELAY_SECONDS => 5,
|
68
68
|
|
69
|
-
24 "
|
69
|
+
24 "ApproximateNumberOfMessages"=> "1000",
|
70
|
+
|
71
|
+
|
70
72
|
|
71
73
|
25 )
|
72
74
|
|
1
ソースの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,4 +16,68 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
+
## アクセス用のソースコード
|
20
|
+
|
21
|
+
```php
|
22
|
+
|
23
|
+
1 <?php
|
24
|
+
|
25
|
+
2 require_once("vendor/autoload.php");
|
26
|
+
|
27
|
+
3
|
28
|
+
|
29
|
+
4 use Aws\S3\S3Client;
|
30
|
+
|
31
|
+
5 use Aws\Sqs\SqsClient;
|
32
|
+
|
33
|
+
6
|
34
|
+
|
35
|
+
7
|
36
|
+
|
37
|
+
8 $config = array(
|
38
|
+
|
39
|
+
9 'version' => 'latest',
|
40
|
+
|
41
|
+
10 'region' => 'us-west-2',
|
42
|
+
|
43
|
+
11 'credentials' => array(
|
44
|
+
|
45
|
+
12 'key' => 'KEY' ,
|
46
|
+
|
47
|
+
13 'secret' => 'secret' ,
|
48
|
+
|
49
|
+
14 )
|
50
|
+
|
51
|
+
15 );
|
52
|
+
|
53
|
+
16
|
54
|
+
|
55
|
+
17 $s3 = S3Client::factory($config);
|
56
|
+
|
57
|
+
18 $sqs = SqsClient::factory($config);
|
58
|
+
|
59
|
+
19
|
60
|
+
|
61
|
+
20 $result = $sqs->createQueue(array(
|
62
|
+
|
63
|
+
21 'QueueName' => 'questring',
|
64
|
+
|
65
|
+
22 'Attributes' => array(
|
66
|
+
|
67
|
+
23 //QueueAttribute::DELAY_SECONDS => 5,
|
68
|
+
|
69
|
+
24 "hogehoge",
|
70
|
+
|
71
|
+
25 )
|
72
|
+
|
73
|
+
26 ));
|
74
|
+
|
75
|
+
27
|
76
|
+
|
77
|
+
28 $queueUrl = $result->get('https://sqs.us-west-2.amazonaws.com/以下省略');
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
```
|
82
|
+
|
19
83
|
エラーがdeniedなので権限がないからだと判断しておりますが、どのように実行権限を取得すればよいでしょうか。
|