Pulumi Amazon Web Services (AWS) Serverless Components
Pulumi's framework for creating easy but powerful serverless components.
This package is meant for use with the Pulumi CLI. Please visit pulumi.io for installation instructions.
$ npm install @pulumi/aws-serverless
$ yarn add @pulumi/aws-serverless
This package provides libraries to simply subscribe to many AWS events and to execute AWS lambdas in response to them.
bucket.onPut/onDelete/onEvent allows you to run an AWS lambda in response to the corresponding bucket
event that is subscribed to.
All subscriptions allow the client to pass a preferred
function.Handler instance to run when the subscription fires.
Handler can either be an AWS
aws.lambda.Function instance (available through the
@pulumi/aws library), or it
In the former case, the
aws.lambda.Function resource can be one that the program has defined itself. Or it can just
be a reference to an existing AWS Lambda that already exists in the client's cloud infrastructure.
For example, a new handler for an S3 bucket's PUT event can be subscribed simply by doing the following:
In this example, we're looking up an existing bucket using the
get method, but we could have created one just as well.
For detailed reference documentation, please visit the API docs.