<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Timo Wagner on Medium]]></title>
        <description><![CDATA[Stories by Timo Wagner on Medium]]></description>
        <link>https://medium.com/@timo.wagner?source=rss-24e9547d7404------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_53ypmj36whmUZsPbP4d8Q.jpeg</url>
            <title>Stories by Timo Wagner on Medium</title>
            <link>https://medium.com/@timo.wagner?source=rss-24e9547d7404------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:29:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@timo.wagner/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to build an API endpoint with Node.js, AWS Lambda and AWS RDS PostgreSQL DB [Part 3]]]></title>
            <link>https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e?source=rss-24e9547d7404------2</link>
            <guid isPermaLink="false">https://medium.com/p/e76f2efede4e</guid>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Timo Wagner]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 13:30:42 GMT</pubDate>
            <atom:updated>2018-12-14T13:58:23.360Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WtfSsqrZheqLikfD" /><figcaption>Photo by <a href="https://unsplash.com/@willy_teee?utm_source=medium&amp;utm_medium=referral">Will Truettner</a></figcaption></figure><h3>Intro</h3><p>The new hype around <a href="https://martinfowler.com/articles/serverless.html">serverless computing</a> (SC) aka Function-as-a-Service (FaaS) made me curious. So I gave it a try to check it out. Therefore I implemented a basic CRUD application for item entities.</p><p>In the previous parts, we created the Node.js API application in our local environment. But now it is time to ship our app into the world. Therefore we will finally deploy it as an AWS lambda function and spin up an AWS RDS PostgreSQL DB. Once again, you should be registered at <a href="https://aws.amazon.com/">Amazon’s AWS</a>.</p><p>I assume you completed the <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-1-a9766bb0de3">part 1</a> and <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-2-a0627ca80a26">part 2</a> or you have already built an existing Node.js application.</p><h3>Initialization of the AWS RDS PostgreSQL</h3><p>You should first create an AWS RDS PostgreSQL instance at AWS. For further details please visit the <a href="https://aws.amazon.com/getting-started/tutorials/create-connect-postgresql-db/?nc1=h_ls">AWS documentation</a>. Do not forget to use the free tier option and leave all the default options. I created a database called awsdb with a user root and the password password. To test your connection with the AWS DB, you can replace the credentials and host URL from our local development configuration in the <em>…/server/config/config.js</em> file. But before using the API application, run again sequelize db:migrate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/385a2a486d8922d93815c4595a7fe006/href">https://medium.com/media/385a2a486d8922d93815c4595a7fe006/href</a></iframe><p>Notice that this is still in the development stage. The given AWS RDS instance is not running anymore, so please set up and connect to your own.</p><p>Now that the database is running and the connection is established, we can deploy our application as an AWS lambda function.</p><h3>AWS lambda deployment</h3><p>We will use the claudia.js framework for easy deployment. Specifically, we can use the <strong><em>aws-serverless-express</em></strong><em> </em>module of claudia.js to translate the express.js requests to AWS API Gateway requests. The wrapper function will be generated automatically by a <em>claudia</em> command. Hence, I assume that you already got <a href="https://claudiajs.com/tutorials/installing.html">claudia.js</a> installed.</p><p>First, we make some changes in our API entry file app.js and stop listening to the TCP port. Instead, we have to export the module by adding module.exports = app;.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/012f8c7130529202a859c5760e286084/href">https://medium.com/media/012f8c7130529202a859c5760e286084/href</a></iframe><p>After that, we are ready to wrap our application and create a serverless proxy with the claudia command line interface: claudia generate-serverless-express-proxy --express-module app. If your main Node.js/express application file is called other than app, replace that name. This command will add the <strong><em>aws-serverless-express </em></strong>dependency and add a file (module) called lambda.js.</p><p>Now we can finally deploy our application as an AWS lambda function. Again use a claudia command: claudia create --handler lambda.handler --deploy-proxy-api --region eu-central-1. You can set the handler which consists of the currently created lambda module (default name) and an AWS region. The app will now be sent to AWS lambda. You will see the URL in the console. For further details, e.g. how to set limitations for the AWS lambda function, refer to the <a href="https://claudiajs.com/tutorials/index.html">claudia documentation</a>.</p><p>If you change the code of your application and you want to re-deploy it, then use the claudia update command.</p><h3>Final Test</h3><p>That’s it! Your API application is finally deployed 🚀</p><p>You can once again test the endpoints by using e.g. the postman tool. Notice to use the right URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FzqS-f6NIJLUqGzEtvp_w.png" /><figcaption>POST request for an item entity to the AWS lambda function</figcaption></figure><p>If it should not work and you get a response like internal server error, you might have to change the security group configuration of your AWS RDS instance. Edit the inbound rules and set the source to Anywhere, so that every IP can reach your AWS RDS instance. This is due to the fact that the IP addresses of AWS lambda functions are dynamically created and not known beforehand. More to limitations on AWS lambda function in the <em>Outro</em> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WUWaZ4eP7QzSTE8tZ1rIw.png" /><figcaption>Changing inbound rule for the AWS RDS instance to <em>Anywhere</em></figcaption></figure><h3>Outro</h3><p>This was just a basic API application. Do not refer to this as best practice in developing an API. The goal was to test how tools like express, sequelize, and claudia can be used for a fast Node.js API deployment in the AWS ecosystem. The advantage of claudia really kicks in, as you can simply build your <em>normal</em> Node.js/express API app. Then, with a few commands, you are able to deploy it as an AWS lambda function.</p><p>There are already good articles out there which summarize the <a href="https://hackernoon.com/what-is-serverless-architecture-what-are-its-pros-and-cons-cc4b804022e9">pros and cons </a>of AWS lambda functions, as well as the <a href="https://medium.com/@tjholowaychuk/dos-and-don-ts-of-aws-lambda-7dfcab7ad115">dos and dont’s</a>. One aspect of their limitations is <strong><em>cold starts</em></strong><em>. </em>Especially if you have to use a virtual private cloud (VPC), the latency of a cold start can add up to 10 seconds. There is a <a href="https://medium.freecodecamp.org/lambda-vpc-cold-starts-a-latency-killer-5408323278dd">great read</a> about this by <a href="https://medium.com/u/3a0c2537ef7e">Nathan Malishev</a>.</p><p>If you want to go fully serverless and exhaust the free tiers of AWS, you should use AWS DynamoDB. The NoSQL DB can also be directly requested via the AWS API Gateway by the client (e.g. web browser). For more information take a look <a href="https://sanderknape.com/2017/10/creating-a-serverless-api-using-aws-api-gateway-and-dynamodb/">here</a>.</p><p>So let’s see if the adaption of <em>serverless</em> functions and services will further increase, and microservices will become <a href="https://www.serverlessops.io/blog/rise-of-the-nanoservice">nanoservices</a>, and docker becomes <a href="https://read.acloud.guru/serverless-is-eating-the-stack-and-people-are-freaking-out-and-they-should-be-431a9e0db482">obsolete</a> 😱</p><p>Thank you for reading my series and I hope I could help you! Feedback is appreciated, just comment below 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e76f2efede4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build an API endpoint with Node.js, AWS Lambda and AWS RDS PostgreSQL DB [Part 2]]]></title>
            <link>https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-2-a0627ca80a26?source=rss-24e9547d7404------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0627ca80a26</guid>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Timo Wagner]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 13:30:33 GMT</pubDate>
            <atom:updated>2018-12-14T13:49:03.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TuEsXxHXgUj05bFJ" /><figcaption>Photo by <a href="https://unsplash.com/@the_roaming_platypus?utm_source=medium&amp;utm_medium=referral">The Roaming Platypus</a></figcaption></figure><h3>Intro</h3><p>The new hype around <a href="https://martinfowler.com/articles/serverless.html">serverless computing</a> (SC) aka Function-as-a-Service (FaaS) made me curious. So I gave it a try to check it out. Therefore I implemented a basic CRUD application for item entities.</p><p>In the <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-1-a9766bb0de3">first part</a> of this three-part tutorial series, we initialized the application and created our item models with sequelize.js. Now it is time to actually build our API endpoints for the item model and set up the PostgreSQL DB for local development and testing. Thus it is assumed that you got a basic understanding of the command line, REST web services, Node.js, express.js, and PostgreSQL.</p><p>In the <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e">last part</a> of the series, we will finally deploy our Node.js API application as an AWS lambda function and spin up an AWS RDS PostgreSQL DB.</p><h3>The API Endpoint</h3><p>We are now creating the API endpoints for the item entity. Therefore, we have to define the controller itemController and the routing. The itemController will handle the creation, updating, deletion and retrieving of the item entities in the PostgreSQL DB. Create a new folder controllers under <em>…/server/controllers</em> and add a file item.js. Insert the following code into that file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/097b6b5f79e55b71ac7b9eeb64fccedd/href">https://medium.com/media/097b6b5f79e55b71ac7b9eeb64fccedd/href</a></iframe><p>To make the controller easily accessible within our app, we export it. Go and create a new file index.js in the <em>…/server/controllers</em> folder. Add this code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a54908fdc6aa3393cab9f2a831edea73/href">https://medium.com/media/a54908fdc6aa3393cab9f2a831edea73/href</a></iframe><p>Now we need to route the incoming API request to the newly created controller function. Hence create the index.js file under <em>…/server/routes</em>. Insert this code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6d37928115571b4b98bc86e6aeb1198/href">https://medium.com/media/b6d37928115571b4b98bc86e6aeb1198/href</a></iframe><p>The new controller route has to be integrated into the entry file app.js of our API application. Therefore, import the routes by modifying the app.js file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fe9b6bdd1e96cda5e098af1602b7835/href">https://medium.com/media/8fe9b6bdd1e96cda5e098af1602b7835/href</a></iframe><p>Now our API has the endpoints POST /api/item (this will create an item entity) and GET /api (this will message <em>Welcome to the API!</em>) and GET * (this will message <em>Welcome!</em>). Before actually using the API, we have to set up and connect our PostgreSQL DB.</p><h3>The PostgreSQL DB</h3><p>At first, we are going to set up the PostgreSQL locally to be able to test if everything is running. It is assumed that you already have <a href="https://wiki.postgresql.org/wiki/Detailed_installation_guides">installed PostgreSQL</a> and the DB is running on <em>http://127.0.0.1:5432</em>. Furthermore, I assume that your PostgreSQL has the superuser postgres with an empty default password (<em>null</em>).<em> </em>You also have to set up a database. We will give it the name db-dev ( createdb db-dev -U postgres).</p><p>So let’s connect our application with the database by properly setting the config.js file in the <em>…/server/config</em> folder:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/50998d3fbbe1fea886bc51e61a7db48b/href">https://medium.com/media/50998d3fbbe1fea886bc51e61a7db48b/href</a></iframe><p>We are only focusing on the development stage for the whole tutorial. Here we set the username to <em>postgres, </em>let<em> </em>password empty (<em>null</em>) and the database name to <em>db-dev </em>(as you already specified in the PostgreSQL DB)<em>. </em>If the DB is running on the specified <em>host </em>URL, we can use the sequelize command line interface to set up the tables in the DB. Let’s persist the item model to the database with sequelize db:migrate.</p><h3>Testing the API endpoints</h3><p>For testing our API endpoints we can use the <a href="https://www.getpostman.com/products">postman</a> tool. This lets you specify the POST request with a JSON body. We are trying to save e.g. the item entity: {&quot;item_id&quot;: 1234, &quot;name&quot;: &quot;laptop&quot;, &quot;weight&quot;: 1.2}. You can now go and connect with your local PostgreSQL DB and view the new item entry. Use e.g. <a href="https://www.pgadmin.org/download/">pgadmin</a> or the <a href="https://alvinalexander.com/blog/post/postgresql/log-in-postgresql-database">command line tool</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4u9nY75LUktx8F_enOu7cw.png" /><figcaption>POST /api/item request via postman</figcaption></figure><h3>Define the remaining API endpoints</h3><p>So far we have only built the POST API endpoint for saving an item entity in the DB. But with that foundation, we can easily complete the CRUD application.</p><p>Let’s go and add a GET endpoint to list all items and a single item by its ID. Therefore, go back to the <em>…/server/controllers/item.js</em> file and add the list function underneath the create function. We will also provide a function to retrieve a single item via GET <em>/api/item/:itemId </em>(e.g. /api/item/1). Notice, that this ID is not our own specified <em>item_id</em>. But you could also use our ID as well, or any other attribute for retrieval (use the query function findAll() with <em>where</em> constraint).</p><p>Next, add a PUT endpoint to update a single item (<em>/api/item/:itemId</em>). Hence add the update function to the other functions in the <em>…/server/controllers/item.js </em>file. Again, be aware of the item ID (!= <em>item_id</em>)!</p><p>Lastly, we build the DELETE endpoint (<em>/api/item</em>) by adding also the delete function. Again, be aware of the item ID (!= <em>item_id</em>)!</p><p>In the following code snippet, you can see the updated <em>item.js</em> file of our controller:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/580a55191d29c5c4aa1b5a3b7358839f/href">https://medium.com/media/580a55191d29c5c4aa1b5a3b7358839f/href</a></iframe><p>Before we are finished, we also need to update our routes for the new endpoints. So update the code in the <em>…/server/routes/index.js</em> file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d307ff9b92dd442c1406baa6a5ba6e24/href">https://medium.com/media/d307ff9b92dd442c1406baa6a5ba6e24/href</a></iframe><p>Go and test your new API endpoints… 🙌</p><p>Finally, our Node.js API application runs in our local environment. In the <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e">last part</a>, you will see how to easily deploy this app on Amazon’s AWS cloud infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0627ca80a26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build an API endpoint with Node.js, AWS Lambda and AWS RDS PostgreSQL DB [Part 1]]]></title>
            <link>https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-1-a9766bb0de3?source=rss-24e9547d7404------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9766bb0de3</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Timo Wagner]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 13:30:19 GMT</pubDate>
            <atom:updated>2019-04-27T18:39:18.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B-X5-qiYKuoScBEp" /><figcaption>Photo by <a href="https://unsplash.com/@fabioha?utm_source=medium&amp;utm_medium=referral">fabio</a></figcaption></figure><h3>Intro</h3><p>The new hype around <a href="https://martinfowler.com/articles/serverless.html">serverless computing</a> (SC) aka Function-as-a-Service (FaaS) made me curious. So I gave it a try to check it out. Therefore I implemented a basic example CRUD application for item entities.</p><p>The application will provide an API endpoint to create, read, update and delete an item (ANY /item). This will be realized with <a href="https://nodejs.org/en/about/">Node.js</a> and <a href="https://expressjs.com/">express.js</a>. The backend will be deployed as an <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS lambda</a> function provided by the <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html">AWS API Gateway</a>. In combination with the <a href="https://claudiajs.com/">claudia.js</a> framework, we are able to set up the API endpoint more conveniently. To be able to store the item entities, we will create a <a href="https://www.postgresql.org/about/">PostgreSQL</a> DB via <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html">AWS RDS</a>. For the ease of use, we will fall back on the framework <a href="http://docs.sequelizejs.com/manual/installation/getting-started.html">sequelize.js</a>.</p><p>For easier reading, this tutorial will be separated into three parts. The first part (this one) comprises the initialization of the CRUD application. The <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-2-a0627ca80a26">second part</a> will focus on the development of the API endpoints and the local database setup. The <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e">third part</a> explains the deployment details at Amazon’s AWS. So if you already have a Node.js API application with sequelize.js running, you can jump to the deployment part (<a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e">part 3</a>).</p><p>The following series assumes that the reader has a basic understanding of the command line, REST web services, Node.js, express.js, and PostgreSQL. You should also be registered at <a href="https://aws.amazon.com/">Amazon’s AWS</a>. AWS Lambda offers free tiers. AWS RDS offers also free tiers but only for new customers. Nevertheless, for experimenting and getting familiar with the platform, it is cheap :)</p><h3>Get started</h3><p>First, we will focus on implementing the Node.js API. For the following, it is assumed that you already got <a href="https://nodejs.org/en/download/package-manager/">Node.js installed</a>. Then create a project folder (e.g. mkdir aws-example) and initialize the project: npm init -y. Then we install some dependencies:<strong><em> </em></strong>npm i -S express body-parser morgan<strong><em> </em></strong>and next npm i -D nodemon. In the package.json file add the following line under the <em>scripts</em> entry: &quot;start:dev&quot;: &quot;nodemon app.js&quot;. Nodemon will now be able to restart automatically every time you make a code change (good for local development). Now create the entry file of our API. Call it e.g. app.js and add this code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d462bfd603081236ae37d3ccdb8f1c24/href">https://medium.com/media/d462bfd603081236ae37d3ccdb8f1c24/href</a></iframe><p>To test the app run npm run start:dev and visit <a href="http://localhost:8000."><em>http://localhost:8000</em>.</a> This is the first initialization of our API. The GET request listens to any endpoint (*). Next, it is time to model our item entities.</p><h3>The item entity and Sequelize</h3><p>This section will set up the item entity or model for our API application. Therefore we will use sequelize.js. So install the sequelize command line interface globally: npm i -g sequelize-cli . Next, create the .sequelizerc file in your root project folder. Add the following configurations into that file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35863f3ca710404a1310dfa0cfd02a9d/href">https://medium.com/media/35863f3ca710404a1310dfa0cfd02a9d/href</a></iframe><p>This defines necessary folders and paths used for the Object-Relational Mapping (ORM) in the Node.js framework. Now it is time to install sequelize and postgres with npm i --save sequelize pg pg-hstore. This allows us to initialize the folder structure defined by the .sequelizerc file. Thus run sequelize init in your root project folder.</p><p>We can now create our item model with the sequelize command line interface: sequelize model:create --name Item --attributes item_id:integer,name:string,weight:float. As you can see we gave it the attributes: <em>item_id</em> (integer), <em>name</em> (string) and <em>weight</em> (float). Sequelize will automatically add an <em>id </em>attribute, as well as<em> createdAt</em> and <em>updatedAt</em> attributes (both dates).</p><p>The <em>item</em> model entity can be found in <em>…/server/models</em> and <em>…/server/migrations</em>. The migrations part will create the item Table (notice the pluralization and capitalization to <em>Items</em>). The models part maps the internal items object to the database object (notice the capitalization to <em>Item</em>).</p><p>For more details on using sequelize and Node.js please go back to other tutorials, as this is just a small example project for an AWS deployment. You could e.g. also define associates (relations between different models, e.g. many-to-one). Hence, take a look into <a href="https://mherman.org/blog/node-postgres-sequelize/">this article</a>.</p><p>Now we have a basic application running and the item models created. In the <a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-2-a0627ca80a26">next part</a> of this tutorial series, we will setup a PostgreSQL DB and the actual API endpoints to test our application locally. In the<a href="https://medium.com/@timo.wagner/how-to-build-an-api-endpoint-with-node-js-aws-lambda-and-aws-rds-postgresql-db-part-3-e76f2efede4e"> last part</a> of the series, we are going to deploy our app to the AWS ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9766bb0de3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>