【发布时间】:2020-06-12 23:28:48
【问题描述】:
我有一个部署到 Digital Ocean Ubuntu 服务器的 Symfony 4 项目。
为了存储文件,我使用了 Amazon S3 存储桶。
我已经使用 aws/aws-sdk-php 库与 Amazon S3 存储桶进行交互。
我在 ~/.aws/credentials 创建了全局凭证文件并设法使其工作。
问题是它在服务器上不起作用。 我将凭据文件复制到服务器的 ~/.aws/ 目录,但出现此错误。
Error retrieving credentials from the instance profile metadata server. (Client error: `GET http://169.254.169.254/latest/meta-data/iam/security-credentials/` resulted in a `404 Not Found` response: not found)
我对此错误进行了一些研究 - 似乎 php 服务器没有找到凭据文件。 我该如何解决这个问题?
【问题讨论】:
标签: php amazon-web-services symfony ubuntu amazon-s3