Introduction to Node.js with the Serverless framework on AWS Lambda

; Date: Sat May 19 2018

Tags: Amazon Web Services »»»» AWS Lambda »»»» Serverless Framework »»»» Node.js

AWS Lambda lets programmers focus on their code, with AWS taking care of all the deployment drama issues.

AWS Lambda was announced in 2014, and now support application development with Java, Python, Node.js and C#

Programmers just write code, the deployment and scaling is handled automatically. It has excellent integration with other AWS services.

One way to envision AWS serverless is that it is the connective tissue for the AWS infrastructure of your application. The Lambda function connects between an event source, and application code.

Serverless == Managed Services + Lambda

The typical workflow to develop Lambda functions is to

  1. Write/deploy the Lambda function
  2. Create/deploy the REST API with API Gateway
  3. Connect that API to the Lambda function(s)
  4. Invoke the API

It's simpler to use the Serverless Framework which takes care of integrating different aspects of the AWS infrastructure into one application descriptor. Instead of configuring and deploying each portion of the application separately, you describe all the pieces in the one file (serverless.yml) and the Serverless framework takes care of setting up the services. It

  • Auto-deploys Lambda event sources like API Gateway, S3, DynamoDB, etc
  • Automatically configures resources in the CloudFormation service
  • Everything is specified in one YAML file

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.