Changing the file structure

Go back to the blog-app directory. The first thing we need to do before restructuring the code is to create a subdirectory named articles, as shown in the following screenshot:

Now, move all the Lambda function handlers that are related to articles to the articles file. Once this is done, you will have the createArticle function in the handler.js file:

However, there are different ways in which you can structure your Lambda function handlers and determine how many Lambda functions you want to deploy per service. ...

Get AWS Lambda Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.