Note: when I use the word “Serverless” with a capital “S” I’m referring to the framework, whereas when I use the word “serverless” with a lowercase “s” I’m referencing the overall methodology.

Since AWS unveiled Lambda in 2014, the close to zero downtime, scalability, and low maintenance overhead have made lambdas an attractive option for API development. If you’ve done any type of serverless development, there are two frameworks you’ve most likely heard of, and probably used for developing serverless APIs. Those would the  AWS-developed SAM-CLI and the  Serverless framework. What these frameworks share is a declarative approach to building APIs with AWS’s API Gateway (along with other CloudFormation resources but today we’re focused on APIs).

OpenAPI

If you’ve ever worked with OpenAPI (or the API specification formerly known as Swagger) you might have noticed how similar these serverless config files look to OpenAPI. Swagger.io, the creators of OpenAPI, provide a variety of helpful tools for generating APIs based on OpenAPI specs, much like how Serverless/SAM generate APIs with API Gateway (Wow that might have been the record for the amount of time “API” has been used in 2 sentences). API Gateway actually supports declaration via the OpenAPI spec as well.

#aws #serverless

Exploring An OpenAPI/Swagger First Approach to Serverless Development on AWS
1.40 GEEK