https://pulumi.com logo
#general
Title
# general
p

proud-tiger-5743

09/21/2018, 10:40 PM
Hi - this is my first time using Pulumi and was wondering if anyone had any boilerplate for building an API gateway - I'm trying to set up an API Gateway proxy -> Kinesis, but it seems that both the
serverless
and
cloud
abstractions don't expose the types of interfaces I need. If anyone has something basic I can experiment with - it would be much appreciated!!!
w

white-balloon-205

09/21/2018, 10:55 PM
The
serverless.apigateway.API
type would be a great way to do this - but as you note, it has not yet added any direct support for
proxy
style routes. That is something that can definitely be added to make this simpler in the future. For now though, you would need to create the API resources and swagger spec manually. You can see an example of that here: https://github.com/pulumi/examples/blob/master/aws-ts-serverless-raw/index.ts and then use a swagger spec along the lines of https://docs.aws.amazon.com/apigateway/latest/developerguide/api-as-kinesis-proxy-export-swagger-with-extensions.html. Definitely would love to add support to
serverless.apigateway.API
for this though - it would be much easier there.
cc @lemon-spoon-91807 as well who is working in this space at the moment.
l

lemon-spoon-91807

09/21/2018, 11:07 PM
hey @proud-tiger-5743 This is definitely something that i'm looking at improving. i have a very very very rough sketch on some improvements here with: https://github.com/pulumi/pulumi-aws-serverless/pull/35/
But like points out the very real use case of connecting apigateway to things like kineses
i don't currently have anything to help with that, but when i can look at this PR again (hopefully in teh next few days) i'll try to roll a solution for that into it.
p

proud-tiger-5743

09/21/2018, 11:39 PM
Thanks @lemon-spoon-91807 and @white-balloon-205 - I'll look at those examples, but having an abstraction would be a huge help. We're working on a template for a demo that will be shown at Re:Invent and having a straightforward deployment method would be a huge help
l

lemon-spoon-91807

09/24/2018, 5:09 AM
Hey @proud-tiger-5743 Is the following guid a good resource for describing what you're trying to accomplish?
w

white-balloon-205

09/24/2018, 1:54 PM
@proud-tiger-5743 can correct me if I'm wrong - but I believe that is the relevant guide - and the Swagger section I linked above in that same part of the AWS docs: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-as-kinesis-proxy-export-swagger-with-extensions.html.
p

proud-tiger-5743

09/24/2018, 2:50 PM
@white-balloon-205 and @lemon-spoon-91807 - I'll give those a try and keep my eye on the serverless PR 🙂