Coder Social home page Coder Social logo

coderecipe-dev / serverless-apigw-sqs-plugin Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 7.0 16 KB

A Serverless plugin that creates an AWS API Gateway resource to connect to an AWS Simple Queue Service (SQS) without the use of a lambda. Without the use of this plugin, any interactions with the queue through public network will need to go through a proxy lambda.

Home Page: https://coderecipe.ai/architectures/17547953

License: MIT License

JavaScript 100.00%
serverless-plugin aws aws-lambda aws-sqs

serverless-apigw-sqs-plugin's Introduction

Serverless-APIGW-SQS-Plugin

npm version serverless

A Serverless plugin that creates an AWS API Gateway resource to connect to an AWS Simple Queue Service (SQS) without the use of a lambda. Without the use of this plugin, any interactions with the queue through public network will need to go through a proxy lambda.

NOTE: As of today AWS does not support FIFO queue to trigger Lambda functions, so only standard queues are currently supported in this plugin.

More info please refer to: https://coderecipe.ai/architectures/17547953

Installation

npm install serverless-apigw-sqs-plugin

Usage

Add plugin to your serverless.yml file.

plugins:
 - serverless-apigw-sqs-plugin

Set API endpoint name and SQS Queue name under custom parameters in your serverless.yml file:

custom:
  apiGwSqs:
    apiEndpoint: '<your api endpoint name goes here>'
    queueName: '<queue name goes here. Can only include alphanumeric characters, hyphens, or underscores. 1 to 80 in length>'

API endpoint that is created will be listed under "endpoints" in the output of sls deploy.

serverless-apigw-sqs-plugin's People

Contributors

coderecipe-dev avatar rohitverma007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

serverless-apigw-sqs-plugin's Issues

New Stack?

why should this plugin create a new stack?
can't it add its content to the main stack?

thanks

How to do schema validation and adding api keys along with this

I have used the plugin and created an API gateway with SQS. But, below is my requirement:
I want to create an AWS API Gateway with SQS and when a message added to the queue, the API Gateway should process it. Also, need to add schema validation and API keys for this. Please help me, because I am new for using serverless

Fails to deploy without error

The deployment process quits at a particular point. I use the plugin in combination with these other plugins:

  • serverless-python-requirements
  • serverless-prune-plugin
  • serverless-package-external
  • serverless-add-api-key

If I remove the plugin, deployment continues successfully.

custom:
  apiGwSqs:
    apiEndpoint: XXXX
    queueName: YYYY

logs:

Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: [serverless-package-external] Symlinking ../common
Serverless: [serverless-package-external] is complete
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...
Serverless: [serverless-package-external] cleaning up
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate

At this point, the deployment process quits without logging anything else.

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.