Advertisement
Guest User

Untitled

a guest
Jan 17th, 2021
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. resource "aws_api_gateway_resource" "Resource" {
  2. rest_api_id = aws_api_gateway_rest_api.apiLambda.id
  3. parent_id = aws_api_gateway_rest_api.apiLambda.root_resource_id
  4. path_part = "bot"
  5.  
  6. }
  7.  
  8. resource "aws_api_gateway_method" "Method" {
  9. rest_api_id = aws_api_gateway_rest_api.apiLambda.id
  10. resource_id = aws_api_gateway_resource.Resource.id
  11. http_method = "POST"
  12. authorization = "NONE"
  13. }
  14.  
  15. resource "aws_api_gateway_integration" "lambdaInt" {
  16. rest_api_id = aws_api_gateway_rest_api.apiLambda.id
  17. resource_id = aws_api_gateway_resource.Resource.id
  18. http_method = aws_api_gateway_method.Method.http_method
  19.  
  20. integration_http_method = "POST"
  21. type = "AWS"
  22. uri = aws_lambda_function.stone2.invoke_arn
  23.  
  24. }
  25.  
  26. resource "aws_api_gateway_method_response" "response_200" {
  27. rest_api_id = aws_api_gateway_rest_api.apiLambda.id
  28. resource_id = aws_api_gateway_resource.Resource.id
  29. http_method = aws_api_gateway_method.Method.http_method
  30. status_code = "200"
  31. }
  32.  
  33. resource "aws_api_gateway_integration_response" "MyDemoIntegrationResponse" {
  34. rest_api_id = aws_api_gateway_rest_api.apiLambda.id
  35. resource_id = aws_api_gateway_resource.Resource.id
  36. http_method = aws_api_gateway_method.Method.http_method
  37. status_code = aws_api_gateway_method_response.response_200.status_code
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement