将请求映射到没有lambda的AWS服务中,并在Api Gateway上使用AWS服务代理集成 [英] Map request into aws service without lambdas and using AWS service proxy integration on Api Gateway

查看:132
本文介绍了将请求映射到没有lambda的AWS服务中,并在Api Gateway上使用AWS服务代理集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一种情况,我想使用一个端点并将提供的请求直接映射到Kinesis流中.

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

我能够在aws控制台中手动完成此操作.

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

但是有没有办法使用无服务器或无服务器插件将集成更改为AWS服务?

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

我试图找到一种方法来部署与aws服务直接通信的端点,而没有lambda,并且找不到它.

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

推荐答案

已经有一段时间了,但是最近我注意到现在有一​​个插件可以帮助您设置此确切配置,

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

这篇关于将请求映射到没有lambda的AWS服务中,并在Api Gateway上使用AWS服务代理集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆