www.awsgood.com
第一次在 SES Console 設定時,到 SMTP 頁面指定產生一組 Credentials,然後就用這 Credential 到 AWS CLI 做 sendmail 驗證,結果一直出現以下訊息:
A client error (SignatureDoesNotMatch) occurred when calling the CreateInvalidation operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
過程猜測過幾個可能:
ses-smtp-xxxxx,所以又重產好幾次就這樣搞了一個多小時 ….
後來才發現 官方文件 針對 Credentials 這樣描述:
There are different types of credentials, and the credentials you use depend on what you want to do. For example, you use AWS access keys when you send an email using the Amazon SES API, and SMTP credentials when you send an email using the Amazon SES SMTP interface.
意思是說,使用 SES API 和 SMTP credentials 是不一樣的,也就在 SES Console -> SMTP 產生的這組 Key 會用來給 SMTP Client 做身份認證;而使用 AWS CLI/SDK 則要使用 IAM Access Key 或者 IAM Role.
新增的 SES 幾個要注意的地方: