问题
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