New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serverless-apigateway-service-proxy

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-apigateway-service-proxy

The Serverless Framewrok plugin for supporting AWS service proxy integration of API Gateway

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
decreased by-36.94%
Maintainers
1
Weekly downloads
 
Created
Source

serverless

Serverless ApiGateway Service Proxy(BETA)

This Serverless Framewrok plugin supports the AWS service proxy integration feature of API Gateway. You can directly connect API Gateway to AWS services without Lambda.

Install

Run npm install in your Serverless project.

$ npm install --save-dev serverless-apigateway-service-proxy

Add the plugin to your serverless.yml file

plugins:
  - serverless-apigateway-service-proxy

Supported AWS services

Here is a services list which this plugin supports for now. But will expand to other services in the feature. Please pull request if you are intersted in it.

  • Kinesis Streams
  • SQS

How to use

Define settings of the AWS services you want to integrate under custom > apiGatewayServiceProxy and run serverless deploy.

Kinesis

Here is syntax for Kinesis proxy in serverless.yml.

custom:
  apiGatewayServiceProxy:
    - kinesis:
        path: /kinesis
        method: post
        streamName: { Ref: 'YourStream' }
        cors: true

resources:
  Resources:
    YourStream:
      Type: AWS::Kinesis::Stream
      Properties:
        ShardCount: 1

Here is a sample request after deploying.

curl -XPOST https://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev/kinesis -d '{"Data": "some data","PartitionKey": "some key"}'  -H 'Content-Type:application/json'

SQS

Here is syntax for SQS proxy in serverless.yml.

custom:
  apiGatewayServiceProxy:
    - sqs:
        path: /sqs
        method: post
        queueName: {"Fn::GetAtt":[ "SQSQueue", "QueueName" ]}
        cors: true

resources:
  Resources:
    SQSQueue:
      Type: "AWS::SQS::Queue"

Here is a sample request after deploying.

curl -XPOST https://xxxxxx.execute-api.us-east-1.amazonaws.com/dev/sqs -d '{"message": "testtest"}' -H 'Content-Type:application/json'

FAQs

Package last updated on 03 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc