In this tutorial, you will learn how to create a Node.js serverless application in AWS Cloud9 using AWS Lambda and Amazon API Gateway.
AWS Lambda lets you run code without provisioning or managing servers. With Lambda, you can run code for virtually any type of application or backend service - just set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.
Amazon API Gateway is a fully managed service that makes it easy for you to create, publish, maintain, monitor, and secure APIs at any scale. With API Gateway you can create an API that acts as a “front door” for AWS Lambda functions.
As a developer, there are numerous ways to build a serverless application. For those looking for a richer coding experience including capabilities such as local debugging or access to a terminal, AWS Cloud9 can help. Cloud9 is a cloud-based integrated development environment (IDE) that includes a code editor, debugger, and terminal, making it easy to write, run, and debug serverless applications with just a browser. It preconfigures the development environment with all the SDKs, libraries, and plug-ins needed for serverless development. Cloud9 also provides an environment for locally debugging AWS Lambda functions. This allows you to iterate on your code directly, saving you time, and improving the quality of your code.
In this example, you will use Cloud9 to build a serverless date and time application. You will create the application, add source code to the function, then use the Cloud9 debugger to walk through the function and its corresponding API. After using Cloud9 to run the function and API locally you will deploy the function and the API to production and test it. After testing out the function and the API in production you will modify the source in Cloud9 and deploy your changes. Finally, you will clean up and delete your resources.
This application development project uses AWS Cloud9, AWS Lambda, Amazon API Gateway as pictured below:

AWS Experience: Beginner
Time to complete: 60 minutes
- An Active AWS Account**
- AWS Cloud9
- AWS Lambda
- Amazon API Gateway
*This estimate assumes you follow the recommended configurations throughout the tutorial and terminate all resources within 24 hours.
**Accounts that have been created within the last 24 hours might not yet have access to the resources required for this learning path.