Skip to content

This is the Example Repository for the Medium Article. It contains all the necessary steps and file that is needed to create a Microservices Architecture with AWS Lambda Layers

Notifications You must be signed in to change notification settings

markuswagner93/serverless-layers-example

Repository files navigation

Lambda Layers Example

This example describes how to use the Serverless Framework to create a microservices architecture with AWS Lambda Layers.

The original Medium Article is made with Zoi by Markus Wagner and is soon gonna be published at Medium.com

Dependencies

  • Node.JS 10
  • Serverless

Setup

See steps in article, or checkout Branch step_1, step_2 and step_3 too see the changes, or follow following instructions:

  1. Install node.js 10 and Serverless
  2. Configure AWS Account in AWS CLI
  3. Replace Account ID from AWS Account in outputs.json, Tutorial for getting the ID.
  4. Run serverless deploy -v -stage dev in the root folder of this project, this will deploy the dependency layer.
  5. Change the current directory to business-logic\ and run serverless deploy -v -stage dev to deploy the hello World Lambda with the dependencies injected from the layer.
  6. Checkout Lambda created by serverless in the AWS Console

IMPORTANT: dependencies-layer must be in a different folder than the business-logic, and then installed as devDependency in to the dependencieslayer and not in the business-logic. All Dependencies that are shared should be installed in to the dependencies-layer.

About

This is the Example Repository for the Medium Article. It contains all the necessary steps and file that is needed to create a Microservices Architecture with AWS Lambda Layers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published