File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ import fs from "node:fs";
6767const lambda = new Lambda ();
6868
6969await 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.
9090import { Lambda } from " @aws-sdk/client-lambda" ;
9191
92- const lambda = new Lambda ({
93- region: " us-west-2" ,
94- });
92+ const lambda = new Lambda ();
9593
9694const listLayers = await lambda .listLayers ({});
9795const 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
You can’t perform that action at this time.
0 commit comments