I trying to replicate the build of an api gateway from an Udemy course in Terraform
On the course the tutor constructs a POST method integration on the console selecting "Lambda Function" as the "Integration Type" NOT selecting "Use Lambda Proxy Integration".
This works fine on the console but when I try to replicate this in Terraform the code:
resource "aws_api_gateway_integration" "build-table-post-integration" {
rest_api_id = aws_api_gateway_rest_api.testAPI.id
resource_id = aws_api_gateway_resource.build-table-resource.id
http_method = aws_api_gateway_method.build-table-method-post.http_method
type = "LAMBDA"
}
I get the following error:
Error: expected type to be one of [HTTP AWS MOCK HTTP_PROXY AWS_PROXY], got LAMBDA
Fair enough but is the logical conclusion of this that a non-proxy integration of Lambda is not supported by Terraform?
Or am I missing the point?
If it's not supported my options are a proxy integration (not really keen) or use the Serverless Framework which does appear to support it (not hugely keen on that either)?