Skip to content

Commit efcab3f

Browse files
Example tweaks
1 parent 62f7c7d commit efcab3f

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

example/clear-ddb-table.mjs

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ function extractRegionAndTableName(arn) {
3333
parts[5].startsWith("table/")
3434
) {
3535
const region = parts[3];
36-
const tableName = parts[5].substring(6); // Remove "table/" prefix
36+
const tableName = parts[5].substring(6);
3737
return { region, tableName };
3838
} else {
39-
return null; // Return null if ARN format is not recognized
39+
return null;
4040
}
4141
}
4242

43-
//import { setTimeout } from "os";
44-
4543
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
4644

4745
class AsyncProcessor {

example/infrastructure/package.json

-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@
1616
"esbuild": "0.20.0",
1717
"ts-node": "10.9.2",
1818
"typescript": "5.3.3"
19-
},
20-
"dependencies": {
21-
"aws-sdk": "2.1548.0"
2219
}
2320
}

example/infrastructure/src/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const main = async () => {
137137
TABLE_NAME: table.tableName,
138138
BUCKET_NAME: bucket.bucketName,
139139
},
140-
runtime: aws_lambda.Runtime.NODEJS_18_X,
140+
runtime: aws_lambda.Runtime.NODEJS_20_X,
141141
memorySize: 128,
142142
timeout: Duration.seconds(60),
143143
handler: "index.handler",
@@ -156,7 +156,8 @@ const main = async () => {
156156
code: aws_lambda.Code.fromAsset("../../llrt-lambda-arm64.zip"),
157157
compatibleRuntimes: [
158158
aws_lambda.Runtime.NODEJS_16_X,
159-
aws_lambda.Runtime.NODEJS_18_X,
159+
aws_lambda.Runtime.NODEJS_20_X,
160+
aws_lambda.Runtime.NODEJS_20_X,
160161
aws_lambda.Runtime.NODEJS_LATEST,
161162
aws_lambda.Runtime.PROVIDED_AL2,
162163
],

0 commit comments

Comments
 (0)