npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@inquisitive/serverless-apigateway-service-proxy

v4.0.0

Published

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

Downloads

667

Readme

@inquisitive/serverless-apigateway-service-proxy

npm version

This is a fork of the serverless-operations/serverless-apigateway-service-proxy project that fixes compatibility with Serverless Framework v4 (issue #170).

What is this plugin?

The Serverless API Gateway Service Proxy plugin enables direct integration between Amazon API Gateway and various AWS services without requiring Lambda functions as intermediaries. This allows you to:

  • Create more cost-effective and lower-latency API endpoints
  • Reduce complexity by eliminating unnecessary Lambda functions
  • Connect API Gateway directly to services like Kinesis, SQS, SNS, S3, DynamoDB, and EventBridge

Installation

npm install @inquisitive/serverless-apigateway-service-proxy

Usage

Add the plugin to your serverless.yml file:

plugins:
  - '@inquisitive/serverless-apigateway-service-proxy'

Then define your service proxies under the custom.apiGatewayServiceProxies section.

Supported AWS Services

This plugin supports direct API Gateway integration with:

  • Kinesis Streams
  • SQS
  • S3
  • SNS
  • DynamoDB
  • EventBridge

Configuration Examples

Kinesis Example

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

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

SQS Example

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

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

S3 Example

custom:
  apiGatewayServiceProxies:
    - s3:
        path: /s3/{key}
        method: post
        action: PutObject
        bucket:
          Ref: S3Bucket
        key:
          pathParam: key
        cors: true

resources:
  Resources:
    S3Bucket:
      Type: 'AWS::S3::Bucket'

SNS Example

custom:
  apiGatewayServiceProxies:
    - sns:
        path: /sns
        method: post
        topicName: { 'Fn::GetAtt': ['SNSTopic', 'TopicName'] }
        cors: true

resources:
  Resources:
    SNSTopic:
      Type: AWS::SNS::Topic

DynamoDB Example

custom:
  apiGatewayServiceProxies:
    - dynamodb:
        path: /dynamodb/{id}
        method: put
        tableName: { Ref: 'YourTable' }
        hashKey:
          pathParam: id
          attributeType: S
        action: PutItem
        cors: true

resources:
  Resources:
    YourTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: YourTable
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: S
        KeySchema:
          - AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1

EventBridge Example

custom:
  apiGatewayServiceProxies:
    - eventbridge:
        path: /eventbridge
        method: post
        source: 'custom_source'
        detailType: 'custom_detail_type'
        eventBusName: { Ref: 'YourBusName' }
        cors: true

resources:
  Resources:
    YourBus:
      Type: AWS::Events::EventBus
      Properties:
        Name: YourEventBus

Common Features

Enabling CORS

Add CORS support to any endpoint:

custom:
  apiGatewayServiceProxies:
    - kinesis:
        path: /kinesis
        method: post
        streamName: { Ref: 'YourStream' }
        cors: true # Enable CORS with default settings

For more granular control:

cors:
  origin: '*'
  headers:
    - Content-Type
    - X-Amz-Date
    - Authorization
    - X-Api-Key
  allowCredentials: false

Adding Authorization

custom:
  apiGatewayServiceProxies:
    - sqs:
        path: /sqs
        method: post
        queueName: { 'Fn::GetAtt': ['SQSQueue', 'QueueName'] }
        authorizationType: 'AWS_IAM' # Options: 'NONE', 'AWS_IAM', 'CUSTOM', 'COGNITO_USER_POOLS'

Why This Fork?

The original project has compatibility issues with Serverless Framework v4, specifically:

  • In Serverless v4, the internal path structure changed, causing the error: Cannot find module 'serverless/lib/plugins/aws/package/compile/events/api-gateway/lib/rest-api'
  • This fork updates the dependencies and fixes these compatibility issues to work with the latest version of the Serverless Framework (v4+)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT