我在Laravel做項目。爲了存儲圖像,我使用aws-s3。我的項目在godaddy服務器上運行得非常好,但不在數字海洋服務器上運行。我得到錯誤的,亞馬遜SQS不斷返回403錯誤
Aws\Sqs\Exception\SqsException: Error executing "ReceiveMessage" on "https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name"; AWS HTTP error: Client error: `POST https://sqs.us-east-1.amazonaws.com/your-account-id/your-queue-name` resulted in a `403 Forbidden` response:
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>I (truncated...)
InvalidClientTokenId (client): The security token included in the request is invalid. - <?xml version="1.0"?><Err......
下面是我用在我的項目設置S3代碼,
filesystem.php
's3' => [
'driver' => 's3',
'key' => '************',
'secret' => '***********',
'region' => 'ap-south-1',
'bucket' => 'xyz',
'options' => [
'ServerSideEncryption' => 'AES256',
]
]
.ENV
QUEUE_DRIVER=redis
我收到這個呃無論是否觸及任何API。我不知道我哪裏錯了。提前致謝。
您顯示的錯誤消息針對的是Amazon SQS(隊列),而不是S3(文件系統)。 – patricus