Serverless API with Claudia.js in 3 Steps

Claudia.js is a open source command line tool that makes rolling out serverless API’s on AWS easy. It uses your code as a blueprint to create an API layer on AWS API Gateway and prepares an AWS Lambda to handle the API requests. It then connects the API layer with the Lambda. The thing that makes this tool so great is that you don’t have to know the inner workings of AWS to start using it. Its so easy to use, you can get started with Claudia.js in just a few steps.

1) Install Claudia.js

If you don’t have Claudia.js installed on your machine, open up your terminal and run the following command to install it:

npm install -g claudia

That command will install Claudia.js globally so you can use it in any directory.

2) Create index file with API methods

In the root of your project directory create an index.js file and install claudia-api-builder.

Add the following Claudia.js template code :

That code tells Claudia.js to create a [GET] API endpoint and tells Lambda to return its query string.

3) Deploy API

To deploy your API, open your terminal and execute the following command:

You should see some log information generated by that command. Claudia.js is creating and configuring AWS services and policies needed for the API to function. Once the deployment process is complete, take note of the URL in the JSON response that looks similar to the following:

Copy that URL and format it to include your API call and a query string and navigate to it in your browser window.

You should have received a response similar to this :

Have fun building API’s!

AWS Devops Guy (

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store