How to use the @aws-cdk/aws-lambda.Runtime.NodeJS810 function in @aws-cdk/aws-lambda

To help you get started, we’ve selected a few @aws-cdk/aws-lambda examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github seagull-js / seagull / packages / deploy / src / lib / cdk / stack.ts View on Github external
private addLambda() {
    const name = `${this.appName}-lambda`
    const conf = {
      code: Code.asset(`${this.folder}/.seagull/deploy`),
      description: 'universal route',
      functionName: `${name}-handler`,
      handler: 'dist/assets/backend/lambda.handler',
      memorySize: 3008,
      role: this.role,
      runtime: Runtime.NodeJS810,
      timeout: 300,
    }

    const lambdaFunction = new LambdaFunction(this, name, conf)
    this.defaultIntegration = new LambdaIntegration(lambdaFunction)
  }
github seagull-js / seagull / packages / deploy-aws / src / seagull_stack.ts View on Github external
addLambda(name: string, folder: string, role: IAM.Role, env: Keymap) {
    const lambdaName = `${this.id}-${name}`
    const conf = {
      code: Code.asset(`${folder}/.seagull/deploy`),
      description: 'universal route',
      environment: env,
      functionName: `${lambdaName}-handler`,
      handler: 'dist/assets/backend/lambda.handler',
      memorySize: 1536,
      role,
      runtime: Runtime.NodeJS810,
      timeout: 300,
    }
    return new Lambda(this, lambdaName, conf)
  }