This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.lambda | |
import com.amazonaws.serverless.exceptions.ContainerInitializationException | |
import com.amazonaws.serverless.proxy.model.AwsProxyRequest | |
import com.amazonaws.serverless.proxy.model.AwsProxyResponse | |
import com.amazonaws.serverless.proxy.spark.SparkLambdaContainerHandler | |
import com.amazonaws.services.lambda.runtime.Context | |
import com.amazonaws.services.lambda.runtime.RequestHandler | |
import spark.Request | |
import spark.Response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWSXRay = require('aws-xray-sdk'); | |
const pg = AWSXRay.capturePostgres(require('pg')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const options = { | |
region: 'us-east-1', | |
logGroupName: '/aws/lambda/readWorkerFunction' | |
}; | |
const lambdaLogger = new CwLogs(options); | |
lambdaLogger.start(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWSXRay = require('aws-xray-sdk'); | |
var AWS = AWSXRay.captureAWS(require('aws-sdk')); | |
const CwLogs = require('aws-cwlogs'); |