All Projects → serverless → serverless-event-gateway-plugin

serverless / serverless-event-gateway-plugin

Licence: other
Event Gateway plugin for Serverless Framework

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to serverless-event-gateway-plugin

microservice-style-guide
There are several articles on ‘internet’ including large companies, showing their microservices using REST, this guide has how to show some good practices and standards so that you have a microservice architecture that is the best possible, totally decoupled and scalable.
Stars: ✭ 93 (+220.69%)
Mutual labels:  api-gateway
kong-java-client
Java Client for Kong API Gateway configuration
Stars: ✭ 69 (+137.93%)
Mutual labels:  api-gateway
bff
A proxy to help your team adopt the Backend for Frontend (BFF) cloud pattern
Stars: ✭ 17 (-41.38%)
Mutual labels:  api-gateway
lura
Ultra performant API Gateway with middlewares. A project hosted at The Linux Foundation
Stars: ✭ 5,159 (+17689.66%)
Mutual labels:  api-gateway
incubator-eventmesh
EventMesh is a dynamic event-driven application runtime used to decouple the application and backend middleware layer, which supports a wide range of use cases that encompass complex multi-cloud, widely distributed topologies using diverse technology stacks.
Stars: ✭ 939 (+3137.93%)
Mutual labels:  event-gateway
pong
🏓 Pong for RESTful APIs (microservices pattern) using Serverless Framework ⚡
Stars: ✭ 27 (-6.9%)
Mutual labels:  api-gateway
safe-client-gateway
Gateway service for Safe apps that serves transaction data conforming with the UI of our mobile apps
Stars: ✭ 33 (+13.79%)
Mutual labels:  api-gateway
amazon-ivs-chime-web-demo
A demo web application intended as an educational tool for demonstrating how to load and play Amazon IVS streams alongside the Amazon Chime SDK.
Stars: ✭ 35 (+20.69%)
Mutual labels:  api-gateway
cim
CIM takes the pain out of Infrastructure as Code and CloudFormation
Stars: ✭ 51 (+75.86%)
Mutual labels:  api-gateway
api-lambda-save-dynamodb
Deploy instantly on Serverless Application Repository
Stars: ✭ 55 (+89.66%)
Mutual labels:  api-gateway
event-gateway
AsyncAPI Event Gateway
Stars: ✭ 35 (+20.69%)
Mutual labels:  event-gateway
terraform-aws-api-gateway
Terraform module to create Route53 resource on AWS for create api gateway with it's basic elements.
Stars: ✭ 43 (+48.28%)
Mutual labels:  api-gateway
Microgateway
Security and management for microservices, with rich functionalities of the CA API Gateway family
Stars: ✭ 35 (+20.69%)
Mutual labels:  api-gateway
serverless-cloud-vision
Serverless API around Google Cloud Vision
Stars: ✭ 31 (+6.9%)
Mutual labels:  api-gateway
kong-ui
UI for KONG API Gateway
Stars: ✭ 20 (-31.03%)
Mutual labels:  api-gateway
serverless-api-gateway-throttling
A plugin for the Serverless framework which configures throttling for API Gateway endpoints.
Stars: ✭ 54 (+86.21%)
Mutual labels:  api-gateway
semaphore
Take control of your data, connect with anything, and expose it anywhere through protocols such as HTTP, GraphQL, and gRPC.
Stars: ✭ 74 (+155.17%)
Mutual labels:  api-gateway
tyk-operator
Tyk Operator for Kubernetes
Stars: ✭ 88 (+203.45%)
Mutual labels:  api-gateway
fastify-gateway
A Node.js API gateway that just works!
Stars: ✭ 88 (+203.45%)
Mutual labels:  api-gateway
getting-started-with-serverless
Follow along with blog posts, code samples, and practical exercises to learn how to build serverless applications from your local Integrated development environment (IDE).
Stars: ✭ 46 (+58.62%)
Mutual labels:  api-gateway

Event Gateway plugin for Serverless Framework

Serverless plugin that publishes your functions and subscriptions to Hosted Event Gateway.

Build Status Known Vulnerabilities

Setup

This is best used with the hosted version of the Event Gateway provided by Serverless, Inc. as a fully-managed service.

After you create an account, you'll need two things: an Access Key and an Application URL.

Get an Access Key in the Access Control section, and save it to your clipboard:

Then, grab the URL for one of your Applications:

Finally, save both of these to your serverless.yml:

# serverless.yml

custom:
  eventgateway:
    url: tenant-yourapp.slsgateway.com
    accessKey: AKmyKey1234

...

You're all set!

Example

Looking for an example to get started? Check out the Getting Started Example to deploy your first service to the Event Gateway.

Usage

  1. Create a new Serverless service and change into the directory.

  2. Install the plugin: (needs Node version 7+)

    $ npm install --save-dev @serverless/serverless-event-gateway-plugin
  3. Enter the necessary plugin and config in serverless.yml:

    # serverless.yml
    
    service: my-service
    
    custom:
      eventTypes:
        http.request:
      eventgateway:
        url: myorg-app.slsgateway.com
        accessKey: <yourkey>
      # To use self-hosted Event Gateway, use the following
      #  url: http://localhost:4000
    
    plugins:
      - "@serverless/serverless-event-gateway-plugin"
    
    provider:
      name: aws
      runtime: python3.6
      stage: dev
      region: us-west-2
    ...
  4. Wire up functions with an eventgateway event type:

    # serverless.yml
    
    functions:
      hello:
        handler: handler.hello
        events:
          - eventgateway:
              type: sync
              eventType: http.request
              path: /hello
              method: GET
      goodbye:
        handler: handler.goodbye
        events:
          - eventgateway:
              type: sync
              eventType: http.request
              path: /goodbye
              method: GET
  5. Deploy, then invoke your function(s):

    $ sls deploy
    ....
    
    $ curl -X GET https://myspace.slsgateway.com/hello
    ...
    
    $ curl -X GET https://myspace.slsgateway.com/goodbye
    ...
  6. View your space configuration with sls gateway dashboard:

    $ sls gateway dashboard
    
    Event Gateway
    
     space: myspace
     endpoint: https://myspace.slsgateway.com
    
    Functions
    ┌─────────────────────────────────┬───────────┬────────────────────────────────────────────────────────────────────────────────┐
    │ Function Id                     │ Region    │ ARN                                                                            │
    ├─────────────────────────────────┼───────────┼────────────────────────────────────────────────────────────────────────────────┤
    │ my-service-dev-hello            │ us-east-1 │ arn:aws:lambda:us-east-1:111111111111:function:my-service-dev-hello            │
    ├─────────────────────────────────┼───────────┼────────────────────────────────────────────────────────────────────────────────┤
    │ my-service-dev-goodbye          │ us-east-1 │ arn:aws:lambda:us-east-1:111111111111:function:my-service-dev-goodbye          │
    └─────────────────────────────────┴───────────┴────────────────────────────────────────────────────────────────────────────────┘
    
    Subscriptions
    ┌────────┬─────────────────────────────────┬────────┬───────────────────────┐
    │ Event  │ Function ID                     │ Method │ Path                  │
    ├────────┼─────────────────────────────────┼────────┼───────────────────────┤
    │ http   │ my-service-dev-hello            │ GET    │ /myspace/hello        │
    ├────────┼─────────────────────────────────┼────────┼───────────────────────┤
    │ http   │ my-service-dev-goodbye          │ GET    │ /myspace/goodbye      │
    └────────┴─────────────────────────────────┴────────┴───────────────────────┘

Concepts

Core concepts:

  • Function: A function is a piece of compute + logic that is ready to respond to an event. Currently, functions can be AWS Lambda functions or HTTP-accessible endpoints.
  • Events: Events are bits of data indicating something happened -- a user was created, a email was sent, or a client requested made an HTTP request.
  • Subscriptions: Events are routed to functions via subscriptions. Subscriptions may be synchronous or asynchronous.

Event concepts:

  • HTTP Request Event: In the Event Gateway, an HTTP request event is an event which represents raw HTTP request. It's especially helpful for building REST APIs or supporting legacy payloads.
  • Custom Events: All non-HTTP request events are custom events. You may have multiple functions subscribed asynchronously to the same custom event.

Auth concepts:

  • Space: A space is a name-spacing mechanism within the Event Gateway. All functions and subscriptions in a space are completely isolated from all other spaces. When using with the hosted Event Gateway, each Application will get its own Space with a unique domain -- https://myorg-my-app.slsgateway.com.
  • Access key: The Access key is the security mechanism for a space within the hosted Event Gateway. A request must have the proper Access key to modify functions and subscriptions in a space.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].