https://pulumi.com logo
Title
c

cold-caravan-83486

01/20/2020, 4:50 PM
specifically, creating
RestApi
,
Deployment
,
Stage
and
Integration
for a
Function
- so far I'm getting stuck at " Error creating API Gateway Deployment: BadRequestException: No integration defined for method status code: 400"
t

tall-librarian-49374

01/20/2020, 4:55 PM
I’ve always used awsx library (e.g. https://github.com/pulumi/examples/blob/master/aws-ts-apigateway/index.ts#L18) to deploy API Gateways + lambdas but it’s only in TypeScript. Maybe it could still be helpful to look at what exactly it does and replicate in .NET?
c

cold-caravan-83486

01/20/2020, 5:05 PM
I'm not familiar with the typescript api, but I can attempt that tomorrow. A lot of github searches suggested that this isn't a commonly attempted task (yet?)
t

tall-librarian-49374

01/20/2020, 7:10 PM
We don’t have a C# example for API Gateway AFAIK. I’d love to see yours when you are done! Thank you.
c

cold-caravan-83486

01/22/2020, 1:54 PM
Turns out I didn't need an integration, just a deployment.
The code is in F#, but here's the relevant bit I ended up using: https://gist.github.com/marklam/ad8a0aa61b17e103fa8adc63c162c988
t

tall-librarian-49374

01/22/2020, 2:02 PM
Thanks! You’ll be my hero if you make a PR to the examples repo.
c

cold-caravan-83486

01/24/2020, 2:50 PM
Done. The auto build doesn't look like it works though.
🎉 1
t

tall-librarian-49374

01/24/2020, 3:19 PM
Yes, it’s a limitation of external PRs.