Fork me on GitHub

Module serverless

@pulumi/aws > serverless

Index

serverless/function.ts

class Function

Function is a higher-level API for creating and managing AWS Lambda Function resources implemented by a Lumi lambda expression and with a set of attached policies.

constructor

new Function(name: string, options: FunctionOptions, func: Handler, opts?: pulumi.ResourceOptions, serialize?: { ... })

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

method registerOutputs

protected registerOutputs(outputs: Inputs | undefined): void

property lambda

public lambda: lambda.Function;

property options

public options: FunctionOptions;

property role

public role: Role;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface Context

Context is the shape of the context object passed to a Function callback.

method getRemainingTimeInMillis

getRemainingTimeInMillis(): string

property awsRequestId

awsRequestId: string;

property callbackWaitsForEmptyEventLoop

callbackWaitsForEmptyEventLoop: boolean;

property clientContext

clientContext: any;

property functionName

functionName: string;

property functionVersion

functionVersion: string;

property identity

identity: any;

property invokedFunctionArn

invokedFunctionArn: string;

property logGroupName

logGroupName: string;

property logStreamName

logStreamName: string;

property memoryLimitInMB

memoryLimitInMB: string;

interface FunctionOptions

FunctionOptions provides configuration options for the serverless Function.

property deadLetterConfig

deadLetterConfig?: { ... };

A dead letter target ARN to send function invocation failures to.

property environment

environment?: pulumi.Input<{ ... }>;

The Lambda environment’s configuration settings.

property excludePackages

excludePackages?: string[];

The packages relative to the program folder to not include the Lambda upload. This can be used to override the default serialization logic that includes all packages referenced by project.json (except @pulumi packages). Default is [].

property includePackages

includePackages?: string[];

The packages relative to the program folder to include in the Lambda upload. The version of the package installed in the program folder and it’s dependencies will all be included. Default is [].

property includePaths

includePaths?: string[];

The paths relative to the program folder to include in the Lambda upload. Default is [].

property memorySize

memorySize?: number;

The memory size limit to use for execution of the Function.

property policies

policies?: ARN[];

A list of IAM policy ARNs to attach to the Function. Must provide either [policies] or [role].

property role

role?: Role;

A pre-created role to use for the Function. Must provide either [policies] or [role].

property runtime

runtime?: lambda.Runtime;

The Lambda runtime to use.

property timeout

timeout?: number;

A timout, in seconds, to apply to the Function.

property vpcConfig

vpcConfig?: { ... };

Configuration for a VPC to run the Function within.

type Handler

type Handler = { ... };

Handler is the signature for a serverless function.