{ "openapi": "3.0.1", "info": { "title": "demo", "version": "1.0" }, "paths": { "/": { "get": { "responses": { "200": { "description": "200 OK", "headers": { "Content-Type": { "schema": { "type": "string" } } } } }, "x-amazon-apigateway-integration": { "type": "aws", "uri": "arn:aws:apigateway:${region}:s3:path/${bucket_name}/index.html", "httpMethod": "GET", "credentials": "${api_gw_role}", "responses": { "2\\d{2}": { "statusCode": 200, "responseParameters": { "method.response.header.Content-Type" : "integration.response.header.Content-Type" } } } } } }, "/{file}": { "get": { "parameters": [ { "name": "file", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK", "headers": { "Content-Type": { "schema": { "type": "string" } } } } }, "x-amazon-apigateway-integration": { "type": "aws", "uri": "arn:aws:apigateway:${region}:s3:path/${bucket_name}/{item}", "httpMethod": "GET", "credentials": "${api_gw_role}", "requestParameters": { "integration.request.path.item": "method.request.path.file" }, "responses": { "2\\d{2}": { "statusCode": 200, "responseParameters": { "method.response.header.Content-Type" : "integration.response.header.Content-Type" } } } } } }, "/api/user": { "get": { "responses": { "200": { "description": "200 OK" } }, "security": [ { "MyUserPool": [] } ], "x-amazon-apigateway-integration": { "type": "aws_proxy", "uri": "${lambda_invoke_arn}", "httpMethod": "POST", "credentials": "${api_gw_role}" } } } }, "components": { "securitySchemes": { "MyUserPool": { "type": "apiKey", "name": "Authorization", "in": "header", "x-amazon-apigateway-authtype": "cognito_user_pools", "x-amazon-apigateway-authorizer": { "type": "cognito_user_pools", "providerARNs": [ "${user_pool_arn}" ] } } } } }