Serverless Architecture using Serverless Framework and AWS Lambda

Atin Kapoor
Mar 4, 2019 · 3 min read
Image for post
Image for post
Serverless Architecture

The aim of this document is to setup Serverless Architecture to implement API end points and/or Lambda functions using Serverless Framework and AWS.

Requirements:

Here are the steps to achieve the requirements in best possible way.

Install Serverless framework:

Create IAM user for Serverless Framework:

Create a new Microservice in serverless framework:

Now we are ready to code, we are working with nodejs, so we will use this command:
serverless create — template aws-nodejs — path LambdaTransformator

In this we have assumed function name as “LambdaTransformator”, you can name it anything you like.

Configure your Microservice using serverless.yml:

Installing dependencies required by the project:

Create project structure:

Test Locally:

Deploy the code on AWS:

That’s’ it! Now when you want to deploy new API on AWS or new Lambda function on AWS, you can use Serverless Framework and use steps mentioned above, and following things will happen:

As you can see these things match the Requirements mentioned earlier in the document.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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