Skip to content

serverless-components/aws-lambda

Repository files navigation

AwsLambda

A serverless component that provisions a Lambda function with optimized package and deployment speed.

Usage

Declarative

name: my-aws-lambda stage: dev AwsLambda@0.1.3::aws-lambda: name: my-func description: My Serverless Function memory: 128 timeout: 20 code: ./code handler: handler.hello runtime: nodejs8.10 env: TABLE_NAME: my-table regoin: us-east-1 # if you'd like to include any shims shims: - ../shims/shim.js  # specifying a deployment bucket would optimise deployment speed # by using accelerated multipart uploads and dependency management with layers bucket: my-deployment-bucket

Programatic

npm i --save @serverless/aws-lambda
const lambda = await this.load('@serverless/aws-lambda') const inputs = { name: 'my-func', description: 'My Serverless Function', memory: 512, timeout: 10, code: './code', bucket: 'my-deployment-bucket', shims: [], handler: 'handler.hello', runtime: 'nodejs8.10', env: {}, region: 'us-east-1' } await lambda(inputs)

About

⚡ Deploy AWS Lambda functions in seconds with Serverless Components.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 10