Advertisement
Guest User

Untitled

a guest
Mar 31st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. If you have an IAM user that you set up using the IAM interface, you need to do the following two steps to enable the user to send email using the Amazon SES SMTP interface:
  2.  
  3. * Derive the user's SMTP credentials from their AWS credentials using the algorithm provided in this section. A user's SMTP username is the same as their AWS Access Key ID, so you just need to generate the SMTP password.
  4.  
  5. * Apply the following policy to the IAM user:
  6.  
  7. ```json
  8. {
  9. "Version": "2012-10-17",
  10. "Statement": [
  11. {
  12. "Effect":"Allow",
  13. "Action":["ses:SendEmail", "ses:SendRawEmail"],
  14. "Resource":"*"
  15. }
  16. ]
  17. }
  18. ```
  19.  
  20. The following pseudocode shows the algorithm that converts an AWS Secret Access Key to an Amazon SES SMTP password.
  21.  
  22. ```
  23. key = AWS Secret Access Key;
  24. message = "SendRawEmail";
  25. versionInBytes = 0x02;
  26. signatureInBytes = HmacSha256(message, key);
  27. signatureAndVer = Concatenate(versionInBytes, signatureInBytes);
  28. smtpPassword = Base64(signatureAndVer);
  29. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement