Giter VIP home page Giter VIP logo

serverless-sns-sqs-offline-example's Introduction

Serverless SNS SQS offline Example

A Serverless application that demonstrate the flow of amazon SQS, SNS and lambda.

Architecture

Architecture

Setup

Instead of declare the AWS access key and secret in the serverless.yml, we use the default AWS profile for development and deployment to hide our keys. Fill in your own profile if you are not using the default profile.

We are using ElasticMQ, an in-memory message queue system, with serverless-offline-sqs plugin to simulate the local AWS SQS environment. We have provided a docker-compose file to establish the ElasticMQ service.

cd ./elasticMQ
docker-compose up -d

Development

npm install
NODE_ENV=development serverless offline start

Deploy

npm install
npm run deploy

Run

node script/invoke.js

ToDo List

  • Better Documentation
  • Replace the wildcard on iamRoleStatements in serverless.yml
  • Auth mechanism to prevent API dispose to public
  • Error handling, Amazon SQS Dead-Letter Queues
  • Test cases
  • CICD pipeline

Remark

There may be a bug on serverless-webpack that it isn't work to use webpack.DefinePlugin to declare the environment variable.

License

This software is released under the MIT license. See the license file for more details.

serverless-sns-sqs-offline-example's People

Contributors

chrisns avatar dependabot[bot] avatar kenyipp 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.