From the course: Complete Guide to Serverless Web App Development on AWS

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Adding a function as a datasource

Adding a function as a datasource

- [Instructor] Let's add one more feature to our backend. In the web app, there is a button labeled, "Send it to me." Let's implement that feature. The Send it to me button sends an email to the user that is logged in when it press it over a feature. To implement this, we need two things. First, when the users is created, we need to subscribe it to an SNS topic so they can receive emails. And then when the user press the button, we want to send the feature info. So there's two different things that we want to do. Let's start by the subscription. To subscribe a new user to a topic, we'll do it with something that is called the Cognito post confirmation flow. Cognito user pool supports different triggers, allowing you to do really cool workflows customization whenever you're working with the users. There is one that is called the post confirmation triggers that runs after a user confirms their email, ensuring only verified users are, for example, in this case, subscribed to our topic…

Contents