Log on to your AWS Lambda Console and Navigate to
Lambda and click on the
Create function button on the right.
Follow the step below to create a function and upload your code
Author from scratchoption from the tab.
- Enter a
Function nameand choose your favourite
Runtime. Leave all things default for now.
Create functionto create a lambda function.
Wait till your function is ready.
Follow the same steps as above and create a function called
saveSubscriptionNodeJS and choose
nodeJs 14.x as runtime. You will see a picture like below.
Paste the following code into the code section of your editor that you can see in your AWS IDE for Lambda
In the code above, we are checking if the phone number is provided or not ( You can add phone number validation if you want) and then using a graphql client we are storing the
phone number into our own model called
Each time you make any changes Click
Deploy button to save and apply your changes.