Coder Social home page Coder Social logo

aws-lambda-serverless-framework's Introduction

AWS Lambda with serverless framework

This code in this repository is explained in this Medium Article and this blog post.

Installation

  • Install docker on your machine. You can follow the steps mentioned in this official docker installation link.

  • Next we need to install serverless framework. It requires nodejs already installed on your machine as serverless framework is written in nodejs. To install nodejs on your machine follow this nodejs installation guide by digital ocean.

  • Once both nodejs and NPM are installed, we can install serverless framework by running the following command.

    npm install -g serverless

  • Then setup your AWS credentials for serverless framework to access your AWS, follow this official setup by serverless.

Deploying the code

  • The repository contains three folder with each for S3, API Gateway and SNS topic.

  • Change your working directory to any one of them and install the following plugins required by serverless. (Note: you must have a secret.live.yml which contains all the secrets and configurations used in the code.)

    sls plugin install -n serverless-python-requirements

    npm install serverless-secrets-plugin

  • Since the examples are written in python you will need virtual environment for python and i preferably use venv. Link to setup venv on your machine.

  • create your virtual environment using the following command and activate it using next command.

    python3 -m venv env

    source env/bin/activate

  • To deploy your lambda function run the following command

    sls deploy

aws-lambda-serverless-framework's People

Contributors

ajays1991 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.