2015-09-04 111 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 –