@@ -65,41 +65,24 @@ Lambda is designed to serve `_next/image*` route in NextJS stack and replaces th
65
65
66
66
### Via CDK
67
67
68
- See ` NextStandaloneStack ` construct in ` lib/construct .ts` .
68
+ See ` NextStandaloneStack ` construct in ` cdk/example .ts` .
69
69
70
- You can easily create ` cdk/app.ts ` and use following code:
71
- ```
72
- #!/usr/bin/env node
73
- import 'source-map-support/register'
74
- import * as cdk from 'aws-cdk-lib'
75
- import * as path from 'path'
76
-
77
- import { NextStandaloneStack } from '@sladg/nextjs-lambda'
78
-
79
- const assetsZipPath = path.resolve(__dirname, '../next.out/assetsLayer.zip')
80
- const codeZipPath = path.resolve(__dirname, '../next.out/code.zip')
81
- const dependenciesZipPath = path.resolve(__dirname, '../next.out/dependenciesLayer.zip')
82
-
83
- const app = new cdk.App()
84
70
85
- new NextStandaloneStack(app, 'StandaloneNextjsStack-2', {
86
- assetsZipPath,
87
- codeZipPath,
88
- dependenciesZipPath,
89
- })
90
- ```
71
+ #### Benchmark
91
72
92
- This imports pre-made construct, you only need to worry about paths to outputed zip files from CLI ` pack ` command.
73
+ - Creation of stack: 385sec (6min 25sec)
74
+ - Run #2 436sec (7min 16sec)
75
+ - Run #3 383sec (6min 23sec)
93
76
94
- > More granular CDK construct coming soon.
95
77
96
- #### Benchmark
78
+ - Deletion of stack: 262sec (4min 22sec)
79
+ - Run #2 319sec (5m 19sec)
97
80
98
- Creation of stack: 385sec (6min 25sec)
99
- Run #2 436sec (7min 16sec)
100
- Deletion of stack: 262sec (4min 22sec)
101
- Update of stack:
102
81
82
+ - Update of stack: 92sec (1min 32sec)
83
+ - Run #2 5sec (no changes)
84
+ - Run #3 3sec (no changes)
85
+ - Run #4 164sec (2min 44sec)
103
86
104
87
### Sharp layer
105
88
0 commit comments