简体   繁体   English

SES AWS错误代码:SignatureDoesNotMatch,状态代码:403

[英]SES AWS Error Code: SignatureDoesNotMatch, Status Code: 403

I'm getting a AWS Error Code: SignatureDoesNotMatch, Status Code: 403 when trying to send a mail through Amazon SES. 我在尝试通过Amazon SES发送邮件时收到AWS错误代码:SignatureDoesNotMatch,状态代码:403。

I have confirmed that I am using the correct credentials which I created via https://console.aws.amazon.com/iam/home?#users and the error still persists. 我已经确认我使用的是通过https://console.aws.amazon.com/iam/home?#users创建的正确凭据,但错误仍然存​​在。

I assume the credentials I've created on the iam/home are in fact global but I do not know what I am doing wrong further. 我假设我在iam / home上创建的凭据实际上是全局的,但我不知道我做错了什么。 The entire error is: 整个错误是:

AWS Error Code: SignatureDoesNotMatch, Status Code: 403, AWS Request ID: xxx, AWS Error Type: client, AWS Error Message: Signature expired: 20140314T031111Z is now earlier than 20140317T15116Z (20140317T151111Z - 5 min.), User-Agent: aws-sdk-php2/2.5.3 Guzzle/3.8.1 curl/7.22.0 PHP/5.3.10-1ubuntu3.10 thrown in /url/Vendor/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91 AWS错误代码:SignatureDoesNotMatch,状态代码:403,AWS请求ID:xxx,AWS错误类型:客户端,AWS错误消息:签名已过期:20140314T031111Z现在早于20140317T15116Z(20140317T151111Z - 5分钟),User-Agent:aws- sdk-php2 / 2.5.3 Guzzle / 3.8.1 curl / 7.22.0 PHP / 5.3.10-1ubuntu3.10在第91行/url/Vendor/Aws/Common/Exception/NamespaceExceptionFactory.php中引发

The actual code is code I pulled from: http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.Ses.SesClient.html#_sendEmail 实际代码是我从以下代码中提取的代码: http//docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.Ses.SesClient.html#_sendEmail

I am firing this script from my local environment. 我从我的本地环境中解雇了这个脚本。

Where would I be able to find credentials that would work? 我在哪里可以找到有用的凭据?

This looks like a clock skew issue. 这看起来像时钟偏差问题。 The time of the machine you are sending the request from is too different from the Amazon SES server's time. 您发送请求的计算机的时间与Amazon SES服务器的时间差异太大。 This is causing your signature to be invalid. 这导致您的签名无效。 Your credentials are probably fine. 你的凭据可能没问题。 Correct your machine's clock or sync up with an NTP server. 更正机器的时钟或与NTP服务器同步。

Along with this solution I have done the following. 除了这个解决方案,我还做了以下几点。

1) I have created the user with PowerUser policy in IAM. 1)我在IAM中创建了具有PowerUser策略的用户。 2) Updated the secret/access key in my code. 2)更新了我的代码中的秘密/访问密钥。

Now it's working. 现在它正在运作。

Not sure why SMTP credentials(Which are created under SES Dashboard) are not working. 不确定为什么SMTP凭据(在SES仪表板下创建)无效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel AWS SES-禁止使用403-尝试发送电子邮件时SignatureDoesNotMatch - Laravel AWS SES - 403 Forbidden - SignatureDoesNotMatch when trying to send email AWS SQS错误:SignatureDoesNotMatch HTTP错误:403 - AWS SQS error : SignatureDoesNotMatch HTTP error: 403 AWS SignatureDoesNotMatch错误,但签名代码似乎有效以及密钥对 - AWS SignatureDoesNotMatch error but signing code seems valid as well as key pair 在 SendMail 异常 AWS SES PHP SDK 中获取未验证身份的错误代码 - Get Error Code For Unverified Identities In SendMail Exception AWS SES PHP SDK 致命错误:未捕获的Aws \\ Glacier \\ Exception \\ GlacierException:AWS错误代码:,状态代码:400,AWS请求 - Fatal error: Uncaught Aws\Glacier\Exception\GlacierException: AWS Error Code: , Status Code: 400, AWS Request Laravel Passport API状态码:403禁止 - Laravel Passport API Status Code:403 Forbidden MVC代码点火器403错误 - MVC Code Igniter 403 Error AWS S3 PHP SDK 2 SignatureDoesNotMatch错误 - aws s3 php sdk 2 SignatureDoesNotMatch Error htaccess-执行PHP文件时的403状态代码 - Htaccess - 403 status code when executing PHP file 尝试从Python访问网页时的403状态代码 - 403 status code while trying to access webpage from Python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM