2015-09-04 185 views
6

我已經遷移服務器和更新AWS藥業,但是一旦我做到了這一點,我發現了以下錯誤:亞馬遜SES版本字段

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Missing required client configuration options: version: (string) A "version" configuration value is required. Specifying a version constraint ensures that your code will not be affected by a breaking change made to the service. For example, when using Amazon S3, you can lock your API version to "2006-03-01". Your build of the SDK has the following version(s) of "email": * "2010-12-01" You may provide "latest" to the "version" configuration value to utilize the most recent available API version that your client's API provider can find. Note: Using 'latest' in a production application is not recommended. A list of available API versions can be found on each client's API documentation page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html . If you are unable to load a specific API version, then you may need to update your copy of the SDK.' in phar:////includes/3rdparty/aws/aws.phar/Aws/ in phar:////includes/3rdparty/aws/aws.phar/Aws/ClientResolver.php on line 328

我已經嘗試通過不同的方法,並尋找其添加沒有任何運氣進入實際文檔。

這裏是我的代碼現在:

$client = SesClient::factory(array(
    'user' => 'uuuuu', 
    'key' => 'aaaaa', 
    'secret' => 'bbbb', 
    'region' => 'us-east-1', 
)); 

$client->version("2010-12-01"); 
//Now that you have the client ready, you can build the message 
$msg = array(); 
//more code after this... 

任何幫助,將不勝感激!

+0

你應該接受埃利的解決方案 –

回答

4

Apparenty,'版本'字段現在是強制性的,所以你必須把它傳遞給工廠。

+0

這是正確的。也爲新版本,密鑰和祕密必須像這樣傳遞:http://stackoverflow.com/a/31582475 –