【以下的问题经过翻译处理】 我不确定问题在哪: 我有一个使用ubuntu:focal作为基础的容器,容器中运行的应用程序使用aws-sdk-php v3.217访问Secrets Manager。当应用程序在EC2实例上运行时,它能够访问AWS服务,但当它在ECS中运行时(具有完全相同的角色权限),我会收到以下错误:
2022/08/26 14:07:07 [error] 11#11: *3162 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Aws\Exception\CredentialsException: Error retrieving credentials from the instance profile metadata service. (cURL error 7: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)) in .../vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php:264
我想要问的问题是,SDK是否需要另一个服务运行才能使用与容器附加的角色,还是完全不同的事情?