Fork me on GitHub

Module serverless

@pulumi/aws > serverless



class Function

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


new Function(name: string, options: FunctionOptions, func?: Handler, opts?: pulumi.ResourceOptions, serialize?: { ... })
  • func Deprecated. Pass the function as [options.func] or [options.factoryFunc] instead.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

method registerOutputs

protected registerOutputs(outputs: Inputs | Promise<Inputs> | Output<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.

type Context

type Context = lambda.Context;

type FunctionOptions

type FunctionOptions = utils.Overwrite<lambda.CallbackFunctionArgs<any, any>, { ... }>;

FunctionOptions provides configuration options for the serverless Function. It is effectively equivalent to [aws.lambda.FunctionArgs] except with a few important differences documented at the property level. For example, [role] is an actual iam.Role instance, and not an ARN. Properties like [runtime] are now optional. And some properties (like [code]) are entirely disallowed.

type Handler

type Handler = lambda.Callback<any, any>;

[Handler] is the signature for a serverless function that will be invoked each time the AWS Lambda is invoked.

type HandlerFactory

type HandlerFactory = { ... };

HandlerFactory is the signature for a function that will be called once to produce the serverless function that AWS Lambda will invoke. It can be used to initialize expensive state once that can then be used across all invocations of the Lambda (as long as the Lambda is using the same warm node instance).