From the course: Building Dynamic Websites using AWS Lambdas
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Send an email from your Lambda function - Amazon Web Services (AWS) Tutorial
From the course: Building Dynamic Websites using AWS Lambdas
Send an email from your Lambda function
- [Instructor] Believe it or not we are already to one of the last mountains you have to climb to reach the peak of a completely dynamic application with no servers. We now need to interact with AWS and specifically SES. We've set up a verified email, we've given Lambda permission to access the service and now we need to write some code. So let me walk you through this because some of it's a little bit non-intuitive. First, just as we required the querystring library we need to require the AWS SDK library. So create a constant called AWS, I prefer to have it all in capitals, and then use require and this time we want aws dash sdk. So that's going to pull in that library. That library will let us use pretty much everything AWS has to offer. The next thing we need is we need an object to actually handle emailing, that we can call methods and functions on. I'm going to call this ses 'cause that's the name of the service and it…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Submit to an API with JavaScript6m 28s
-
Test your new JavaScript submission2m 59s
-
Deal with the dreaded CORS problem3m 58s
-
Challenge: Update your HTML with the Lambda response2m 32s
-
Solution: Update your HTML with the Lambda response4m 20s
-
Get SES ready for sending email2m 43s
-
Give your Lambda function permissions to use SES4m 15s
-
Send an email from your Lambda function5m 54s
-
Convert your Lambda to run synchronously5m 17s
-
Challenge: Add in the information from the feedback form to your Lambda function1m 48s
-
Solution: Add in the information from the feedback form to your Lambda function3m 47s
-
-
-