Skip to content

Commit 40a7b5f

Browse files
committed
chore: wip
1 parent 7e93b43 commit 40a7b5f

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

storage/framework/.stacks/core/cloud/src/cloud/ai.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ export interface AiStackProps extends NestedCloudProps {
1414

1515
export class AiStack {
1616
constructor(scope: Construct, props: AiStackProps) {
17-
// // Define the Lambda Layer for aws-sdk
18-
// const awsSdkLayer = new lambda.LayerVersion(scope, 'AwsSdkLayer', {
19-
// code: lambda.Code.fromAsset('aws-sdk-layer'),
20-
// compatibleRuntimes: [lambda.Runtime.NODEJS_18_X],
21-
// description: 'Layer with aws-sdk',
22-
// })
17+
// Define the Lambda Layer for aws-sdk
18+
const awsSdkLayer = new lambda.LayerVersion(scope, 'AwsSdkLayer', {
19+
code: lambda.Code.fromAsset('src/cloud/aws-sdk-layer'),
20+
compatibleRuntimes: [lambda.Runtime.NODEJS_20_X],
21+
description: 'Layer with aws-sdk',
22+
})
2323

2424
// Defining the Node.js Lambda function
2525
const aiLambda = new lambda.Function(scope, 'LambdaFunction', {
2626
runtime: lambda.Runtime.NODEJS_20_X,
2727
handler: 'index.handler',
28-
code: lambda.Code.fromAsset('lambda'),
29-
// layers: [awsSdkLayer],
28+
code: lambda.Code.fromAsset('src/cloud/lambda'), // path relative to the cloud root package dir
29+
layers: [awsSdkLayer],
3030
})
3131

3232
const api = new apigateway.LambdaRestApi(scope, 'ApiGateway', {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "aws-sdk-layer",
3+
"version": "1.0.0",
4+
"description": "",
5+
"author": "",
6+
"license": "ISC",
7+
"keywords": [],
8+
"main": "index.js",
9+
"scripts": {
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"dependencies": {
13+
"aws-sdk": "^2.1469.0"
14+
}
15+
}

0 commit comments

Comments
 (0)