AWSTemplateFormatVersion: "2010-09-09" Description: "The AWS CloudFormation template for deployment of the AWS Data Lake RESTful API" Parameters: AuthorizerArn: Type: String AdminArn: Type: String CartArn: Type: String ProfileArn: Type: String SearchArn: Type: String PackageArn: Type: String Resources: DataLakeLambdaExecRole: Type: "AWS::IAM::Role" Metadata: cfn_nag: rules_to_suppress: - id: W28 reason: "Explicit name to avoid cyclic dependency, ease of referencing and better readeability" Properties: RoleName: !Join ["-", ["data-lake-apig-role", Ref: "AWS::Region" ]] AssumeRolePolicyDocument: Version: "2012-10-17" Statement: - Effect: "Allow" Principal: Service: - "apigateway.amazonaws.com" Action: - "sts:AssumeRole" Path: "/" DataLakeLambdaExecPolicy: Type: "AWS::IAM::ManagedPolicy" Properties: Description: "Data Lake policy for the data lake api to invoke Lambda microservices." PolicyDocument: Version: "2012-10-17" Statement: - Effect: "Allow" Action: - "lambda:InvokeFunction" Resource: - Ref: "AdminArn" - Ref: "AuthorizerArn" - Ref: "CartArn" - Ref: "ProfileArn" - Ref: "SearchArn" - Ref: "PackageArn" Roles: - Ref: "DataLakeLambdaExecRole" DataLakeRestApi: Type: AWS::ApiGateway::RestApi Properties: Body: swagger: "2.0" info: version: "2017-02-18T14:57:27Z" title: "data-lake-api2" basePath: "/prod" schemes: - "https" paths: /admin/apikeys: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/apikeys/{access_key_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/invitations: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/settings/config: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/settings/governance: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/settings/governance/{setting_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/groups: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/groups/membership/{user_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/groups/{group_name}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/users: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/users/{user_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /admin/users/{user_id}/forgotPassword: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AdminArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /cart: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "CartArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /cart/{item_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "CartArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/datasets: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/datasets/{dataset_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/datasets/{dataset_id}/process: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/metadata: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/metadata/{metadata_id}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/tables: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/tables/{table_name}: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /packages/{package_id}/crawler: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "PackageArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /profile: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "ProfileArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /profile/apikey: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "ProfileArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /search: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "SearchArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn /search/stats: options: consumes: - "application/json" produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,POST,PUT,DELETE,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,x-api-key,x-amz-security-token,Auth'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\":200}" passthroughBehavior: "when_no_match" type: "mock" x-amazon-apigateway-any-method: produces: - "application/json" responses: "200": description: "200 response" schema: $ref: "#/definitions/Empty" security: - Data_Lake_Authorizer: [] x-amazon-apigateway-integration: uri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "SearchArn", "/invocations"]] passthroughBehavior: "when_no_match" httpMethod: "POST" type: "aws_proxy" credentials: !GetAtt DataLakeLambdaExecRole.Arn securityDefinitions: Data_Lake_Authorizer: type: "apiKey" name: "Auth" in: "header" x-amazon-apigateway-authtype: "custom" x-amazon-apigateway-authorizer: authorizerResultTtlInSeconds: 300 authorizerUri: !Join ["", ["arn:aws:apigateway:", Ref: "AWS::Region",":lambda:path/2015-03-31/functions/", Ref: "AuthorizerArn", "/invocations"]] authorizerCredentials: !GetAtt DataLakeLambdaExecRole.Arn type: "token" definitions: Empty: type: "object" title: "Empty Schema" Outputs: ApiId: Description: "Id of data lake API" Value: !Ref DataLakeRestApi