Skip to content

Instantly share code, notes, and snippets.

@mxro
Created February 20, 2021 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxro/32bbf9f5aa1623480ffe8185aaeecc48 to your computer and use it in GitHub Desktop.
Save mxro/32bbf9f5aa1623480ffe8185aaeecc48 to your computer and use it in GitHub Desktop.
resource "aws_api_gateway_integration" "lambda" {
rest_api_id = aws_api_gateway_rest_api.main.id
resource_id = aws_api_gateway_method.proxy.resource_id
http_method = aws_api_gateway_method.proxy.http_method
# Lambdas can only be invoked via Post - but the gateway will also forward GET requests etc.
integration_http_method = "POST"
type = "AWS_PROXY"
uri = aws_lambda_function.main.invoke_arn
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment