Skip to content

Commit a7a4c8b

Browse files
authored
docs: update AWS_LAMBDA.md
1 parent 7b252c9 commit a7a4c8b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

supplemental-docs/AWS_LAMBDA.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import fs from "node:fs";
6767
const lambda = new Lambda();
6868

6969
await lambda.publishLayerVersion({
70-
LayerName: "MyAwsSdkDependencies-layer",
70+
LayerName: "AWS-SDK-JavaScript-v3.750.0-layer",
7171
Description: "Contains AWS SDK dependencies to use in my AWS Lambda functions",
7272
Content: {
7373
// read the layer zip file as a buffer.
@@ -89,13 +89,11 @@ find the ARN another way.
8989
// example: looking up the layer's ARN by using its name from earlier.
9090
import { Lambda } from "@aws-sdk/client-lambda";
9191

92-
const lambda = new Lambda({
93-
region: "us-west-2",
94-
});
92+
const lambda = new Lambda();
9593

9694
const listLayers = await lambda.listLayers({});
9795
const layerArn = listLayers.Layers.find(
98-
(l) => l.LayerName === "MyAwsSdkDependencies-layer"
96+
(l) => l.LayerName === "AWS-SDK-JavaScript-v3.750.0-layer"
9997
).LatestMatchingVersion.LayerVersionArn;
10098
```
10199

0 commit comments

Comments
 (0)