Tôi đang cố gắng gửi tin nhắn SMS SNS tới android thông qua api web. Downloaded và cài đặt SDK từ http://aws.amazon.com/developers/getting-started/php/AWS SDK cho PHP: Lỗi khi truy xuất thông tin xác thực từ máy chủ siêu dữ liệu tiểu sử mẫu
Got lỗi sau khi chạy sample.php:
Fatal error: Uncaught exception 'Aws\Common\Exception\InstanceProfileCredentialsException' with message 'Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key" and "secret" options when creating a client or provide an instantiated Aws\Common\Credentials\CredentialsInterface object. ([curl] 28: Connection timed out after 5016 milliseconds [url] http://169.254.169.254/latest/meta-data/iam/security-credentials/)' in C:\xampp\htdocs\aws-php\vendor\aws\aws-sdk-php\src\Aws\Common\InstanceMetadata\InstanceMetadataClient.php:85 Stack trace: #0 C:\xampp\htdocs\aws-php\vendor\aws\aws-sdk-php\src\Aws\Common\Credentials\RefreshableInstanceProfileCredentials.php(52): Aws\Common\InstanceMetadata\InstanceMetadataClient->getInstanceProfileCredentials() #1 C:\xampp\htdocs\aws-php\vendor\aws\aws-sdk-php\src\Aws\Common\Credentials\AbstractRefreshableCredentials.php(54): Aws\Common\Credentials\Refreshable in C:\xampp\htdocs\aws-php\vendor\aws\aws-sdk-php\src\Aws\Common\InstanceMetadata\InstanceMetadataClient.php on line 85
Một chút hướng dẫn về chủ đề này sẽ giúp tôi rất nhiều
Điều này có nghĩa rằng bạn đã không được cấu hình thông tin của bạn một cách chính xác. Vui lòng xem [Cung cấp thông tin xác thực cho SDK] (http://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html) từ SDK AWS cho Hướng dẫn sử dụng PHP. –
Tôi đã định cấu hình tệp /.aws/credentials với AWS_ACCESS_KEY_ID và AWS_SECRET_ACCESS_KEY như đã đề cập ở đây. Tuy nhiên nó không hoạt động – Ravindra
@Ravindra Bạn đã bao giờ tìm thấy một giải pháp? Tôi gặp vấn đề tương tự –