brief-football-29481
06/30/2024, 4:34 AMfuture-hairdresser-70637
07/01/2024, 2:12 PMbrief-football-29481
07/04/2024, 6:30 PMfuture-hairdresser-70637
07/05/2024, 12:53 PM// Your Lambda code here.
) becomes an AWS Lambda functionfuture-hairdresser-70637
07/05/2024, 12:56 PMdocsBucket.onObjectCreated("docsHandler", (event: aws.s3.BucketEvent) => {
if (event && event.Records) {
for (const record of event.Records) {
// do something with the s3 bucketEvent record
}
}
});
brief-football-29481
07/06/2024, 9:56 AMbrief-football-29481
07/06/2024, 9:56 AMbrief-football-29481
07/06/2024, 9:58 AMfuture-hairdresser-70637
07/06/2024, 11:31 AM// also a dependency in your pulumi project's package.json file
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
// ... more code ...
docsBucket.onObjectCreated("docsHandler", (event: aws.s3.BucketEvent) => {
// TODO: do something with dynamodb in this lambda
const client = new DynamoDBClient({});
if (event && event.Records) {
for (const record of event.Records) {
// do something with the s3 bucketEvent record
}
}
});
future-hairdresser-70637
07/06/2024, 11:43 AMfuture-hairdresser-70637
07/06/2024, 11:46 AMCustomizing the Lambda
to allow you to config the generated lambdabrief-football-29481
07/14/2024, 5:47 PMbrief-football-29481
07/14/2024, 5:48 PMbrief-football-29481
07/14/2024, 5:48 PMfuture-hairdresser-70637
07/15/2024, 12:11 PMfuture-hairdresser-70637
07/15/2024, 12:11 PMfn
resource there will get created as a Lambda functionbrief-football-29481
07/16/2024, 7:19 AMbrief-football-29481
07/16/2024, 7:19 AMif you need nodejs 20 (I think the default is 16) there's code there underBut I cannot find anything related to how to change the node runtime versionto allow you to config the generated lambdaCustomizing the Lambda
future-hairdresser-70637
07/16/2024, 11:39 AMtimeout
which is one of the many optional properties you can specify. you're looking for runtime
, so... something like: