npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

raml2serverless

v1.0.15

Published

A tool to process RESTful API Specification in RAML Format and generate 'Source Code Templates (Development)' & 'AWS CloudFormation Templates (Deployment)' for server-less implementation on AWS.

Downloads

66

Readme

RAML2Serverless

This tool is built to support the Development and Deployment phases of RESTful APIs to be deployed as server-less implementations on the AWS Platform. This tool takes the RESTful API design/specification in RAML format and generates the following:

Source Code Templates - (currently for node.js). These are empty function definitions as expected by AWS Lambda. These map to the resource-methods on AWS API Gateway

CloudFormation Template - This has the definition for the Lambda Functions and the mapping to corresponding resource-definition on AWS API Gateway. The template is simple and readable and uses the AWS Serverless Application Model (SAM).

We can then provide the implementation for the generated code and then execute some commands to deploy ( or redeploy) the code to AWS.

This requires us to initialize the AWS CLI.

Installation & Usage

Install: npm install -g raml2serverless

Navigate to any directory of your choice :

cd some-custom-location

Run the following command to process the RAML file :

raml2serverless <name-or-relative-path-to-RAMLfile>

e.g. 

raml2serverless ./Pets.RAML

CloudFormation Template and Source Code Templates will be created in the "output" directory

Deployment (updates) to AWS

Initialize the AWS CLI

Create a S3 bucket with full-permissions for the user (This is for uploading source-code. You can use an existing bucket)

Use the following command to upload the code to S3 and get an updated CloudFormation template.

aws cloudformation package --template <cloudformation-template> --s3-bucket <S3 bucket> --output json <updated-cloudformation-template>

Use the following command to create or update the resources on AWS (This will create Roles, Policies, Lambda Functions, API Gateway Definitions and deployments)

aws cloudformation deploy --template <updated-cloudformation-template> --stack-name <stack-name> --capabilities CAPABILITY_IAM  

Test the API by calling the AWS API Gateway Endpoint.

License

MIT