Context constructor

Context({String handler String functionName String functionMemorySize String logGroupName String logStreamName String requestId String invokedFunction String region String executionEnv String accessKey String secretAccessKey String sessionToken })

Implementation

Context(
    {String handler,
    String functionName,
    String functionMemorySize,
    String logGroupName,
    String logStreamName,
    String requestId,
    String invokedFunction,
    String region,
    String executionEnv,
    String accessKey,
    String secretAccessKey,
    String sessionToken}) {
  assert(requestId != null);
  assert(handler != null);

  this.handler = handler ?? Platform.environment[_kAWSLambdaHandler];
  this.functionName =
      functionName ?? Platform.environment[_kAWSLambdaFunctionName];
  this.functionVersion =
      functionVersion ?? Platform.environment[_kAWSLambdaFunctionVersion];
  this.functionMemorySize = functionMemorySize ??
      Platform.environment[_kAWSLambdaFunctionMemorySize];
  this.logGroupName =
      logGroupName ?? Platform.environment[_kAWSLambdaLogGroupName];
  this.logStreamName =
      logStreamName ?? Platform.environment[_kAWSLambdaLogStreamName];
  this.requestId = requestId;
  this.invokedFunctionArn = invokedFunctionArn;
  this.region = region ?? Platform.environment[_kAWSLambdaRegion];
  this.executionEnv =
      executionEnv ?? Platform.environment[_kAWSLambdaExecutionEnv];
  this.accessKey = accessKey ?? Platform.environment[_kAWSLambdaAccessKey];
  this.secretAccessKey =
      secretAccessKey ?? Platform.environment[_kAWSLambdaSecretAccesKey];
  this.sessionToken =
      sessionToken ?? Platform.environment[_kAWSLambdaSessionToken];
}