From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Send an SES message

Send an SES message

- [Instructor] So now that we've configure our simple email service with our two email addresses from the cake producer and the cake ordering system. We are ready to create the code for sending the email from our system. So, we have created this file the cake producer manager that is quite empty. So let's start filling it up. So here we are going to write all the logic that we need in order to send the email. For that we are going to use the aws-sdk. So we need to require it and we are going to use the ses module from this library. When you configure the ses module you need to send in which region you need this module. So for that, we are going to create an environmental variable as we did with the table and the stream name in the previous chapter. So we get these region from our serverless yml. So if it change then our code gets automatically updated. So we are going to do that. And here we are going to have two constants…

Contents