Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

RIALTO SPARQL Proxy Lambda

Michael J. Giarlo edited this page Oct 18, 2018 · 2 revisions

The SPARQL Proxy is the "front door" to RIALTO Core's canonical store. To view useful SPARQL incantations that one might send, view SPARQL Recipes.

The RIALTO SPARQL Proxy is running as an AWS Lambda. See more in the AWS Console

Authorization

To access this lambda via API gateway, you need to pass an API key along with the request. See RIALTO Combine Core Integration for more details.

In the AWS Console

Create a new Lambda Function

  1. Create Function

    1. Name
    2. Runtime => Go 1.x
    3. Role => "Choose an existing role"
    4. Existing Role => RialtoLambda
  2. Configuration

    1. Designer - used to setup triggers... TBD
    2. Function Code => Upload the ZIP file created for the Lambda
      1. Runtime (verify set to Go 1.x)
      2. Handler => "main"
    3. Environment variables
    4. Tags => N/A
    5. Execution Role (Verify set to "RialtoLambda")
    6. Network
      1. Select "vpc-xxx | rialto-core"
      2. Subnets
      3. Security Groups => " ... | rialto-core"
    7. Execution Role

Create an API Gateway endpoint for Lambda Execution

  1. Create API
    1. API Name
    2. Endpoint Type => "Regional"
  2. Create Method
    1. Actions pulldown => Create Method
    2. Select => (HTTP METHOD, i.e. POST), click check mark
  3. HTTP METHOD SETUP
    1. Integration type => Lambda
    2. Lambda Region => us-east-1 (or appropriate region)
    3. Lambda Function => Name of function from above (will autocomplete)
    4. Save
  4. HTTP METHOD - Method Execution
    1. NOTE: This step is critical for passing the "raw" http data to the lambda.
    2. Click the "Integration Request" header
    3. Select "Body Mapping Templates"
    4. Choose "When there are no templates defined (recommended)"
    5. Click "Add Mapping template"
    6. Enter the http content type (i.e. application/x-www-form-urlencoded) - click check mark
    7. In the text area:
{
    "body": $input.json('$')
}
  1. Actions => Deploy API
    1. NOTEs:
      1. API Gateway Endpoints are NOT available until they have been "deployed"
      2. Any changes to API Gateway configuration require a redeploy
    2. Deployment state => "" (this is the end of the url: http://...../

About RIALTO

RIALTO Core

Specs

Integration and Components

RIALTO Web App

RIALTO Combine (ETL)

Staging / Production

Terraform

Development

VIVO Assessment

VIVO/Vitro Dev Docs

Clone this wiki locally