Map request into aws service without lambdas and using AWS service proxy integration on Api Gateway

倖福魔咒の 提交于 2020-01-14 06:19:59

问题


So i've got a scenario that i want to use an endpoint and map the provided requests directly into Kinesis stream.

I was able to do that manually in the aws console.

But is there a way to do change the integration to aws service using serverless or serverless plugin?

I tried to find a way to deploy an endpoint that communicates directly with an aws service, without lambdas, and could not find it.


回答1:


It's been a while but recently i noticed that there's a plugin now that helps setup this exact configuration, https://github.com/horike37/serverless-apigateway-service-proxy

custom:
  apiGatewayServiceProxies:
    - kinesis:
        path: /kinesis
        method: post
        streamName: { Ref: 'YourStream' }
        cors:
          origin: '*'
          headers:
            - Content-Type
            - X-Amz-Date
            - Authorization
            - X-Api-Key
            - X-Amz-Security-Token
            - X-Amz-User-Agent
          allowCredentials: false

Hope this helps others that are still having this problem



来源:https://stackoverflow.com/questions/49409515/map-request-into-aws-service-without-lambdas-and-using-aws-service-proxy-integra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!