(Enlarge)
|
- The first thing that you will need to do is to go into SES and add (and validate) two email addresses. One will serve as the "from" address and the other will be the "to" address (whom you want to send the email address to).
|
(Enlarge)
|
- Once you have entered and validated the two email addresses you will need to get the "identity arn" number. Under Email Addresses of the SES, in this example we get the arn for the "from" address.
|
(Enlarge)
|
- You will also need to create an IAM user that will be used to deal with email messages. In the IAM area, create the user and be sure to record the secret key and the access key (as both will be required for the Lambda Node.js code).
|
(Enlarge)
|
- Under the IAM section you will also need to create a policy for sending email messages. If you are still in the SES "sandbox" (or restricted mode) both your "from" and "to" email addresses have to be specified in the policy document even though you've separately validated both of them. Odd, huh?
|
(Enlarge)
|
- Under the IAM section you should already have at least one Lambda role (with one or more policies attached to it) that you use in order attach to your Lambda Node.js code in order to control how it runs. When you find that Lambda role, you could attach the email policy that you just created to it as shown in this example.
|
(Enlarge)
|
- Finally, in your Lambda Node.js code as shown in this example, you set up the SES and then add code in order to send an email message.
|