-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
1748 lines (1670 loc) · 112 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Serverless Framework CLI redesign</title>
<meta name="description" content="Gathering feedback on the redesign of the Serverless Framework CLI output." />
<meta property="og:description" content="Gathering feedback on the redesign of the Serverless Framework CLI output." />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="https://sls-redesign.netlify.app/screen.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Serverless Framework CLI redesign" />
<meta name="twitter:site" content="@goServerless">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon.png">
<link href="styles.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
</head>
<body class="bg-gray-100">
<div class="bg-black py-6">
<div class="mx-auto max-w-3xl flex flex-col items-center">
<img class="h-10" src="https://assets-global.website-files.com/60acbb950c4d6606963e1fed/60acbb950c4d66854e3e2013_logo%20serverless%20dark.svg">
</div>
</div>
<div id="app" class="container mx-auto px-3 my-16">
<div class="mx-auto prose">
<h1>v3.0 CLI redesign</h1>
<p>
This document presents CLI redesigns planned for the future <a href="https://github.com/serverless/serverless">Serverless Framework</a> v3.0.
Our goal is to gather feedback from the community.
</p>
<p>Here is a quick preview, complete examples are included below:</p>
</div>
<div class="terminal max-w-2xl mx-auto mt-4 mb-8">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p><span class="text-gray">endpoints:</span> https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-gray">functions:</p>
<p class="ml-5">index: myapp-dev-index <span class="text-gray">(10 KB)</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="mx-auto prose">
<h2>Design principles</h2>
<p>
The goal of the redesign is to provide a better user experience with a simpler output and consistent design across all <a href="https://www.serverless.com/">Serverless</a> products.
</p>
<ul>
<li>
<strong>Optimize for use-cases</strong>: prioritize the most important information.
<p>For example, deploying is all about getting changes live. The most important information is not the deployment log but the application URL (or any other output).</p>
<p>On the other hand, the most important information for a failed deployment is the error itself.</p>
</li>
<li>
<strong>Minimize noise</strong>: by default, only show necessary information. Minimize formats.
<p>We want to keep verbose information an option, but it should not be the default behavior.</p>
</li>
</ul>
<h2>Colors and styles</h2>
<p>
Colors and styles should be consistent with other Serverless products.
As such, CLI output formatting aims to be <strong>clear</strong> and <strong>minimalistic</strong>.
</p>
<p>
Usage of bold, italic, and underline should be exceptional.
</p>
<p>
Serverless is a single-color brand. Thus, colors are intentionally limited to:
</p>
<div class="flex items-center mb-2">
<div class="inline-block h-5 w-5 bg-white shadow rounded mr-4"></div>
<div class="flex-grow">White: default color, used for almost all information.</div>
<code>#ffffff</code>
</div>
<div class="flex items-center mb-2">
<div class="inline-block h-5 w-5 bg-red shadow rounded mr-4"></div>
<div class="flex-grow">Red: used for drawing attention.</div>
<code>#fd5750</code>
</div>
<div class="flex items-center mb-2">
<div class="inline-block h-5 w-5 bg-gray shadow rounded mr-4"></div>
<div class="flex-grow">Gray: secondary color used for secondary information.</div>
<code>#8c8d91</code>
</div>
<p>
Use of other colors, including green, should be exceptional.
</p>
<p>
For terminals that do not support 16 million colors, ANSI basic red and gray colors should be used (even in 256 colors terminals).
</p>
<h3>Using red for success</h3>
<p>
Using red to highlight everything, including success, is intentional.
It allows to match the Serverless branding while adding uniqueness to the CLI's identity.
</p>
<p>
That doesn't mean that success and error logs should display identically.
With clear wording, symbols and appropriate amount of color, success and failures can be communicated clearly:
</p>
</div>
<div class="terminal max-w-2xl mx-auto mt-4">
<div><span class="text-red">✔</span> Application deployed succesfully</div>
</div>
<div class="terminal max-w-2xl mx-auto mt-4 mb-8">
<div class="text-red">✖ Deployment failed</div>
</div>
<div class="mx-auto prose">
<h2>Redesign examples</h2>
<p>
The examples below illustrate multiple scenarios.
The left side shows the current CLI design.
The right side shows the future CLI design.
</p>
</div>
<h2>Successful deployment</h2>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">............................................</p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/foo</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/bar</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">foo: myapp-dev-foo</p>
<p class="ml-5">bar: myapp-dev-bar</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p class="text-gray">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/foo</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/bar</p>
<p class="text-gray">functions:</p>
<p class="ml-5">foo: myapp-dev-foo <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">bar: myapp-dev-bar <span class="text-gray">(10 KB)</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
</div>
<comments :id="2"></comments>
<h2>Ongoing deployment</h2>
<div class="prose max-w-none mb-4">
<p>
Instead of printing all deployment steps to the output, the new design includes a spinner that refreshes in-place.
As long as every step succeeds, the next step overrides the previous one, keeping the output as minimal as possible.
Below is an illustration:
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">............<span v-for="i in second">.</span></p>
</div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">{{ frames[frame] }} </span>
<span v-if="step === 0">Packaging</span>
<span v-if="step === 1">Uploading (222 KB)</span>
<span v-if="step === 2">Updating CloudFormation stack</span>
<span v-if="step === 3">Updating CloudFormation stack <span class="text-gray">(1/9)</span></span>
<span v-if="step === 4">Updating CloudFormation stack <span class="text-gray">(3/9)</span></span>
<span v-if="step === 5">Updating CloudFormation stack <span class="text-gray">(6/9)</span></span>
<span class="text-gray"> ({{ 20 + second }}s)</span>
</p>
</div>
</div>
<comments :id="4"></comments>
<h2>Deploying with Dashboard</h2>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Using provider credentials, configured via dashboard: https://app.serverless.com/vulcan/apps/kilo/kilo-backend/prod/us-east-1/providers</span></p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">............................................</p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="ml-5">jobsWorker: myapp-dev-worker</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p>Serverless: <span class="text-yellow">Publishing service to the Serverless Dashboard...</span></p>
<p>Serverless: <span class="text-yellow">Successfully published your service to the Serverless Dashboard: https://app.serverless.com/myorg/apps/kilo/kilo-backend/prod/us-east-1</span></p>
</div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1, "main" provider)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p><span class="text-gray">dashboard:</span> https://app.serverless.com/myorg/apps/kilo/kilo-backend/prod/us-east-1</p>
<p class="text-gray">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">jobsWorker: myapp-dev-worker <span class="text-gray">(10 KB)</span></p>
<p class="text-gray">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
</div>
</div>
<comments :id="6"></comments>
<h2>API Gateway proxy configuration (e.g. ExpressJS app)</h2>
<div class="prose max-w-none mb-4">
<p>
When an application deploys a single "catch-all" API endpoint (for example an ExpressJS application),
we can simplify further by replacing the <code>endpoints:</code> list with a single <code>endpoint:</code> field.
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div></div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p class="text-gray">functions:</p>
<p class="ml-5">web: myapp-dev-web <span class="text-gray">(10 KB)</span></p>
<p><span class="text-gray">endpoint:</span> https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com</p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
</div>
<comments :id="7"></comments>
<h2>Error</h2>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">......</p>
<p>Serverless: <span class="text-yellow">Operation failed!</span></p>
<p>Serverless: <span class="text-yellow">View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A416566615250%3Astack%2Fmyapp-dev%2F26eca400-e881-11eb-8b2d-0edef5a02865</span></p>
<p> </p>
<p class="text-yellow"> Serverless Error ----------------------------------------</p>
<p> </p>
<p> An error occurred: HelloLambdaFunction - Resource handler returned message: "Value nodejs12.xa at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs12.x, python3.6, provided, nodejs14.x, ruby2.7, java11, go1.x, provided.al2, java8, java8.al2, dotnetcore3.1, python3.7, python3.8] or be a valid ARN</p>
<p> </p>
<p class="text-yellow ml-5">Get Support --------------------------------------------</p>
<p class="ml-10"><span class="text-yellow">Docs:</span> docs.serverless.com</p>
<p class="ml-10"><span class="text-yellow">Bugs:</span> github.com/serverless/serverless/issues</p>
<p class="ml-10"><span class="text-yellow">Issues:</span> forum.serverless.com</p>
<p> </p>
<p class="text-yellow ml-5">Your Environment Information ---------------------------</p>
<p class="ml-10 text-yellow whitespace-pre">Operating System: darwin</p>
<p class="ml-10 text-yellow whitespace-pre">Node Version: 15.14.0</p>
<p class="ml-10 text-yellow whitespace-pre">Framework Version: 2.52.1</p>
<p class="ml-10 text-yellow whitespace-pre">Plugin Version: 5.4.3</p>
<p class="ml-10 text-yellow whitespace-pre">SDK Version: 4.2.5</p>
<p class="ml-10 text-yellow whitespace-pre">Components Version: 3.14.0</p>
</div>
<div>
<div class="terminal v3">
<p>$ serverless deploy <span class="text-gray"># without the Dashboard</span></p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p class="text-red">✖ Stack myapp-dev failed to deploy <span class="text-gray">(31s)</span></p>
<p> </p>
<pre class="text-gray">Environment darwin, node v15.14.0, framework v2.51.2, plugin v5.4.3, SDK v4.2.3
Credentials: Local credentials, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues</pre>
<p> </p>
<p class="text-red">Error:</p>
<p>UPDATE_FAILED: HelloLambdaFunction <span class="text-gray">(AWS::Lambda::Function)</span></p>
<p>Resource handler returned message: "Value nodejs12.xa at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [java8, java11, nodejs10.x, nodejs12.x, python2.7, python3.6, python3.7, python3.8, dotnetcore2.1, go1.x, ruby2.5] or be a valid ARN.</p>
<p> </p>
<p class="text-gray">View the full error: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A416566615250%3Astack%2Fmyapp-dev%2F8f271030-bbec-11eb-b27c-0a4ced5e22b5</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy <span class="text-gray"># with the Dashboard</span></p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p class="text-red">✖ Stack myapp-dev failed to deploy <span class="text-gray">(31s)</span></p>
<p> </p>
<pre class="text-gray whitespace-pre-wrap">Environment: darwin, node v15.14.0, framework v2.51.2, plugin v5.4.3, SDK v4.2.3
Credentials: Serverless Dashboard (https://app.serverless.com/myorg/apps/myapp/myapp/settings/providers)
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues</pre>
<p> </p>
<p class="text-red">Error:</p>
<p>UPDATE_FAILED: HelloLambdaFunction <span class="text-gray">(AWS::Lambda::Function)</span></p>
<p>Resource handler returned message: "Value nodejs12.xa at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [java8, java11, nodejs10.x, nodejs12.x, python2.7, python3.6, python3.7, python3.8, dotnetcore2.1, go1.x, ruby2.5] or be a valid ARN.</p>
<p> </p>
<p class="text-gray">View the full error: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A416566615250%3Astack%2Fmyapp-dev%2F8f271030-bbec-11eb-b27c-0a4ced5e22b5</p>
</div>
</div>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy <span class="text-gray"># User error</span></p>
<p> </p>
<p class="text-yellow"> Serverless Error ----------------------------------------</p>
<p> </p>
<p> Configuration error at 'functions.hello.timeout': should be integer</p>
<p> </p>
<p> Learn more about configuration validation here: http://slss.io/configuration-validation</p>
<p> </p>
<p class="text-yellow ml-5">Get Support --------------------------------------------</p>
<p class="ml-10"><span class="text-yellow">Docs:</span> docs.serverless.com</p>
<p class="ml-10"><span class="text-yellow">Bugs:</span> github.com/serverless/serverless/issues</p>
<p class="ml-10"><span class="text-yellow">Issues:</span> forum.serverless.com</p>
<p> </p>
<p class="text-yellow ml-5">Your Environment Information ---------------------------</p>
<p class="ml-10 text-yellow whitespace-pre">Operating System: darwin</p>
<p class="ml-10 text-yellow whitespace-pre">Node Version: 15.14.0</p>
<p class="ml-10 text-yellow whitespace-pre">Framework Version: 2.52.1</p>
<p class="ml-10 text-yellow whitespace-pre">Plugin Version: 5.4.3</p>
<p class="ml-10 text-yellow whitespace-pre">SDK Version: 4.2.5</p>
<p class="ml-10 text-yellow whitespace-pre">Components Version: 3.14.0</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy <span class="text-gray"># User error</span></p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p class="text-red">✖ Stack myapp-dev failed to deploy <span class="text-gray">(0s)</span></p>
<p> </p>
<pre class="text-gray">Environment darwin, node v15.14.0, framework v2.51.2, plugin v5.4.3, SDK v4.2.3
Credentials: Local credentials, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues</pre>
<p> </p>
<p class="text-red">Error:</p>
<p>Configuration error at 'functions.hello.timeout': should be integer</p>
<p> </p>
<p>Learn more about configuration validation here: http://slss.io/configuration-validation</p>
</div>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy <span class="text-gray"># Programmer error</span></p>
<p> </p>
<p class="text-yellow"> Type Error ----------------------------------------</p>
<p> </p>
<pre> TypeError: Oh no, an internal error happened
at Object.aws:package:finalize:addExportNameForOutputs [as hook] (/Users/serverless/lib/plugins/aws/package/index.js:91:15)
at PluginManager.invoke (/Users/serverless/lib/classes/PluginManager.js:580:20)
at PluginManager.spawn (/Users/serverless/lib/classes/PluginManager.js:602:16)
at Object.package:finalize [as hook] (/Users/serverless/lib/plugins/aws/package/index.js:83:69)
at PluginManager.invoke (/Users/serverless/lib/classes/PluginManager.js:580:20)
at async PluginManager.spawn (/Users/serverless/lib/classes/PluginManager.js:602:5)
at async /Users/serverless/scripts/serverless.js:803:9</pre>
<p> </p>
<p class="text-red"> For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.</p>
<p> </p>
<p class="text-yellow ml-5">Get Support --------------------------------------------</p>
<p class="ml-10"><span class="text-yellow">Docs:</span> docs.serverless.com</p>
<p class="ml-10"><span class="text-yellow">Bugs:</span> github.com/serverless/serverless/issues</p>
<p class="ml-10"><span class="text-yellow">Issues:</span> forum.serverless.com</p>
<p> </p>
<p class="text-yellow ml-5">Your Environment Information ---------------------------</p>
<p class="ml-10 text-yellow whitespace-pre">Operating System: darwin</p>
<p class="ml-10 text-yellow whitespace-pre">Node Version: 15.14.0</p>
<p class="ml-10 text-yellow whitespace-pre">Framework Version: 2.52.1</p>
<p class="ml-10 text-yellow whitespace-pre">Plugin Version: 5.4.3</p>
<p class="ml-10 text-yellow whitespace-pre">SDK Version: 4.2.5</p>
<p class="ml-10 text-yellow whitespace-pre">Components Version: 3.14.0</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy <span class="text-gray"># Programmer error</span></p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p class="text-red">✖ Stack myapp-dev failed to deploy <span class="text-gray">(0s)</span></p>
<p> </p>
<pre class="text-gray">Environment darwin, node v15.14.0, framework v2.51.2, plugin v5.4.3, SDK v4.2.3
Credentials: Local credentials, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues</pre>
<p> </p>
<p class="text-red">Error:</p>
<pre>TypeError: Oh no, an internal error happened
at Object.aws:package:finalize:addExportNameForOutputs [as hook] (/Users/serverless/lib/plugins/aws/package/index.js:91:15)
at PluginManager.invoke (/Users/serverless/lib/classes/PluginManager.js:580:20)
at PluginManager.spawn (/Users/serverless/lib/classes/PluginManager.js:602:16)
at Object.package:finalize [as hook] (/Users/serverless/lib/plugins/aws/package/index.js:83:69)
at PluginManager.invoke (/Users/serverless/lib/classes/PluginManager.js:580:20)
at async PluginManager.spawn (/Users/serverless/lib/classes/PluginManager.js:602:5)
at async /Users/serverless/scripts/serverless.js:803:9</pre>
<p> </p>
<p class="text-gray">Run again with the '--verbose' option to get more logs.</p>
</div>
</div>
<div class="prose max-w-none mb-4">
<p>The errors shown above are <em>fatal</em> errors: the process stops because an error was thrown.</p>
<p>
Some errors must not stop the process, for example (but not limited to) when running applications with serverless-offline.
Here is what these errors would look like:
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless offline <span class="text-gray"># Non-fatal error</span></p>
<p>Serverless: <span class="text-yellow">Bundling with Webpack...</span></p>
<pre>assets by status 0 bytes [cached] 1 asset
<span class="font-bold text-red">ERROR</span> in <span class="font-bold text-green">main</span>
<span class="font-bold">Module <span class="text-red">not found</span>: <span class="text-red">Error</span>: Can't resolve './src' in '/Users/serverless/demo'</span>
resolve './src' in '/Users/serverless/demo'
using description file: /Users/serverless/demo/package.json (relative path: .)
using description file: /Users/serverless/demo/package.json (relative path: ./src)
no extension
<span class="font-bold text-red">/Users/serverless/demo/src doesn't exist</span>
.js
<span class="font-bold text-red">/Users/serverless/demo/src.js doesn't exist</span>
.json
<span class="font-bold text-red">/Users/serverless/demo/src.json doesn't exist</span>
.wasm
<span class="font-bold text-red">/Users/serverless/demo/src.wasm doesn't exist</span>
as directory
<span class="font-bold text-red">/Users/serverless/demo/src doesn't exist</span>
webpack compiled with <span class="font-bold text-red">1 error</span> in 129 ms
Serverless: <span class="text-yellow">Watching for changes...</span>
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ GET | http://localhost:3000/hello │
│ POST | http://localhost:3000/2015-03-31/functions/hello/invocations │
│ │
└─────────────────────────────────────────────────────────────────────────┘
[HTTP] server ready: http://localhost:3000 🚀
</pre>
</div>
<div class="terminal v3">
<p>$ serverless offline <span class="text-gray"># Non-fatal error</span></p>
<pre><span class="font-bold text-red">✖ Error in main</span><span class="text-gray">
Module not found: Error: Can't resolve './src' in '/Users/serverless/demo'
resolve './src' in '/Users/serverless/demo'
using description file: /Users/serverless/demo/package.json (relative path: .)
using description file: /Users/serverless/demo/package.json (relative path: ./src)
no extension
/Users/serverless/demo/src doesn't exist
.js
/Users/serverless/demo/src.js doesn't exist
.json
/Users/serverless/demo/src.json doesn't exist
.wasm
/Users/serverless/demo/src.wasm doesn't exist
as directory
/Users/serverless/demo/src doesn't exist</span>
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ GET | http://localhost:3000/hello │
│ POST | http://localhost:3000/2015-03-31/functions/hello/invocations │
│ │
└─────────────────────────────────────────────────────────────────────────┘
[HTTP] server ready: http://localhost:3000 🚀
</pre>
</div>
</div>
<comments :id="9"></comments>
<h2>Warnings</h2>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-orange">WARNING: duplicate plugin some-plugin was not loaded</span></p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">............................................</p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p><span class="text-orange">Warning: duplicate plugin some-plugin was not loaded</span></p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p class="text-gray">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher <span class="text-gray">(10 KB)</span></p>
<p class="text-gray">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
</div>
<comments :id="15"></comments>
<h2>Deprecations</h2>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p class="text-yellow">............................................</p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="ml-5">jobsWorker: myapp-dev-worker</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p>Serverless: <span class="text-orange font-bold">Deprecation warnings:</span></p>
<p> </p>
<p class="text-orange font-bold">Detected ".env" files. In the next major release variables from ".env" files will be automatically loaded into the serverless build process. Set "useDotenv: true" to adopt that behavior now.</p>
<p class="text-orange">More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES</p>
<p> </p>
<p class="text-orange font-bold">Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead</p>
<p class="text-orange">More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS</p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>
<span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span>
</p>
<p> </p>
<p class="text-gray">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">jobsWorker: myapp-dev-worker <span class="text-gray">(10 KB)</span></p>
<p class="text-gray">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p> </p>
<p class="text-gray">2 deprecations found: run 'serverless doctor' for more details</p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="terminal v3">
<p>$ serverless doctor</p>
<p>2 deprecations triggered in the last command:</p>
<p> </p>
<p>Detected ".env" files. In the next major release variables from ".env" files will be automatically loaded into the serverless build process. Set "useDotenv: true" to adopt that behavior now.</p>
<p class="text-gray">More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES</p>
<p> </p>
<p>Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead</p>
<p class="text-gray">More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS</p>
</div>
</div>
</div>
<comments :id="8"></comments>
<h2>Non-interactive deployment (no TTY, e.g. CI/CD)</h2>
<div class="prose max-w-none mb-4">
<p>
Interactive progresses are hidden and colors are disabled.
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: Packaging service...</p>
<p>Serverless: Excluding development dependencies...</p>
<p>Serverless: Uploading CloudFormation file to S3...</p>
<p>Serverless: Uploading artifacts...</p>
<p>Serverless: Uploading service myapp.zip file to S3 (10.28 KB)...</p>
<p>Serverless: Validating template...</p>
<p>Serverless: Updating Stack...</p>
<p>Serverless: Checking Stack update progress...</p>
<p>............................................</p>
<p>Serverless: Stack update finished...</p>
<p class="underline">Service Information</p>
<p>service: myapp</p>
<p>stage: dev</p>
<p>region: us-east-1</p>
<p>stack: myapp-dev</p>
<p>resources: 14</p>
<p>api keys:</p>
<p class="ml-5">None</p>
<p>endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p>functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="ml-5">jobsWorker: myapp-dev-worker</p>
<p>layers:</p>
<p class="ml-5">None</p>
<p>Serverless: Removing old service artifacts from S3...</p>
<p> </p>
<p>Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev (us-east-1)</p>
<p> </p>
<p>✔ Service deployed to stack myapp-dev (31s)</p>
<p> </p>
<p>functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher (10 KB)</p>
<p class="ml-5">jobsWorker: myapp-dev-worker (10 KB)</p>
<p>endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p> </p>
<p>Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
</div>
<comments :id="10"></comments>
<h2>Verbose deployment</h2>
<div class="prose max-w-none mb-4">
<p>
The normal output is very minimal. Using the <code>--verbose</code> option prints all details.
An extra verbosity level is available via <code>--debug</code>: this option prints verbose logs + internal Framework logs.
</p>
<p>
Preview of <code>--verbose</code>:
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy --verbose</p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p>CloudFormation - <span class="text-yellow">UPDATE_IN_PROGRESS</span> - AWS::CloudFormation::Stack - myapp-dev</p>
<p>CloudFormation - <span class="text-yellow">UPDATE_IN_PROGRESS</span> - AWS::Lambda::Function - HelloLambdaFunction</p>
<p>CloudFormation - <span class="text-green">UPDATE_COMPLETE</span> - AWS::Lambda::Function - HelloLambdaFunction</p>
<p>CloudFormation - <span class="text-yellow">CREATE_IN_PROGRESS</span> - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p>CloudFormation - <span class="text-yellow">CREATE_IN_PROGRESS</span> - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p>CloudFormation - <span class="text-green">CREATE_COMPLETE</span> - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p>CloudFormation - <span class="text-yellow">UPDATE_COMPLETE_CLEANUP_IN_PROGRESS</span> - AWS::CloudFormation::Stack - myapp-dev</p>
<p>CloudFormation - DELETE_SKIPPED - AWS::Lambda::Version - HelloLambdaVersion8XeTw8dmeCepXt2KSltXLxzAn2z8aH4w7yi4yX9Aq4</p>
<p>CloudFormation - <span class="text-green">UPDATE_COMPLETE</span> - AWS::CloudFormation::Stack - myapp-dev</p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="ml-5">jobsWorker: myapp-dev-worker</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p> </p>
<p class="text-yellow underline">Stack Outputs</p>
<p><span class="text-yellow">HelloLambdaFunctionQualifiedArn:</span> arn:aws:lambda:us-east-1:416566615250:function:myapp-dev-hello:5</p>
<p><span class="text-yellow">HttpApiId:</span> wd6m3kwta5</p>
<p><span class="text-yellow">ServerlessDeploymentBucketName:</span> myapp-dev-serverlessdeploymentbucket-18gm15gzf8306</p>
<p><span class="text-yellow">HttpApiUrl:</span> https://wd6m3kwta5.execute-api.us-east-1.amazonaws.com</p>
<p> </p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div class="terminal v3">
<p>$ serverless deploy --verbose</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p>Packaging <span class="text-gray">(3s)</span></p>
<p>Uploading (222 KB) <span class="text-gray">(3s)</span></p>
<p>Updating CloudFormation stack <span class="text-gray">(11s)</span></p>
<div class="text-gray">
<p> UPDATE_IN_PROGRESS - AWS::CloudFormation::Stack - myapp-dev</p>
<p> UPDATE_IN_PROGRESS - AWS::Lambda::Function - HelloLambdaFunction</p>
<p> UPDATE_COMPLETE - AWS::Lambda::Function - HelloLambdaFunction</p>
<p> CREATE_IN_PROGRESS - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p> CREATE_IN_PROGRESS - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p> CREATE_COMPLETE - AWS::Lambda::Version - HelloLambdaVersionxo7mVIrb5qrFjIjhs7GmYITXR7zJ5sH0JkO8kC2tb4s</p>
<p> UPDATE_COMPLETE_CLEANUP_IN_PROGRESS - AWS::CloudFormation::Stack - myapp-dev</p>
<p> DELETE_SKIPPED - AWS::Lambda::Version - HelloLambdaVersion8XeTw8dmeCepXt2KSltXLxzAn2z8aH4w7yi4yX9Aq4</p>
<p> UPDATE_COMPLETE - AWS::CloudFormation::Stack - myapp-dev</p>
</div>
<p>Service deployed to stack myapp-dev <span class="text-gray">(31s)</span></p>
<p> </p>
<p class="text-gray">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">jobsWorker: myapp-dev-worker <span class="text-gray">(10 KB)</span></p>
<p class="text-gray">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p> </p>
<p class="text-gray">Stack outputs:</p>
<p> HelloLambdaFunctionQualifiedArn: arn:aws:lambda:us-east-1:416566615250:function:myapp-dev-hello:5</p>
<p> HttpApiId: wd6m3kwta5</p>
<p> ServerlessDeploymentBucketName: myapp-dev-serverlessdeploymentbucket-18gm15gzf8306</p>
<p> HttpApiUrl: https://wd6m3kwta5.execute-api.us-east-1.amazonaws.com</p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
</div>
<comments :id="11"></comments>
<h2>With plugins</h2>
<div class="prose max-w-none mb-4">
<p>
With v2.x, plugins log to the output using <code>console.log()</code> or <code>serverless.cli.log()</code>.
In v3, plugins can extend the structured output with new APIs.
</p>
</div>
<!-- <pre class="terminal">class MyPlugin {-->
<!-- constructor(serverless, options, { logger }) {-->
<!-- <span class="text-gray">// Creates/updates a spinner</span>-->
<!-- logger.progress.update('id', 'Message');-->
<!-- <span class="text-gray">// Removes the spinner (when the corresponding task is done)</span>-->
<!-- logger.progress.update('id', 'Message');-->
<!-- <span class="text-gray">// Adds a new section to the "Service information"</span>-->
<!-- serverless.addServiceOutputSection('section name', 'content');-->
<!-- <span class="text-gray">// Logs a warning message</span>-->
<!-- logger.warning('Message');-->
<!-- <span class="text-gray">// Logs a message for the --verbose level</span>-->
<!-- logger.info('Message');-->
<!-- <span class="text-gray">// Logs a message for the --debug level</span>-->
<!-- logger.debug('Message');</pre>-->
<div class="prose max-w-none mb-4">
<p>
The example below is inspired from a project using the following plugins: warmer, webpack, storage and domain manager.
</p>
</div>
<div class="grid xl:grid-cols-2 gap-4">
<div class="terminal v2">
<p>$ serverless deploy</p>
<p>Serverless: <span class="text-yellow">Running "serverless" installed locally (in service node_modules)</span></p>
<p>Serverless: <span class="text-yellow">WarmUp: Creating warmer "officeHoursWarmer" to warm up 9 functions:</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-login</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-logout</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerAuth</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerLink</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerRefresh</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userCreate</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userDelete</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userRead</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userUpdate</span></p>
<p>Serverless: <span class="text-yellow">WarmUp: Creating warmer "outOfOfficeHoursWarmer" to warm up 9 functions:</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-login</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-logout</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerAuth</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerLink</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-providerRefresh</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userCreate</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userDelete</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userRead</span></p>
<p>Serverless: <span class="text-yellow whitespace-pre"> * kilo-backend-prod-userUpdate</span></p>
<p>Serverless: <span class="text-yellow">Bundling with Webpack...</span></p>
<pre>assets by path src/functions/ 349 KiB
assets by path src/functions/user/ 42 KiB
asset src/functions/user/create/handler.js 10.5 KiB [emitted] [minimized] (name: src/functions/user/create/handler) 1 related asset
asset src/functions/user/update/handler.js 10.5 KiB [emitted] [minimized] (name: src/functions/user/update/handler) 1 related asset
asset src/functions/user/read/handler.js 10.5 KiB [emitted] [minimized] (name: src/functions/user/read/handler) 1 related asset
asset src/functions/user/delete/handler.js 10.5 KiB [emitted] [minimized] (name: src/functions/user/delete/handler) 1 related asset
asset src/functions/refresh/handler.js 94.1 KiB [emitted] [minimized] (name: src/functions/refresh/handler) 1 related asset
asset src/functions/auth/handler.js 94.1 KiB [emitted] [minimized] (name: src/functions/auth/handler) 1 related asset
asset src/functions/link/handler.js 94.1 KiB [emitted] [minimized] (name: src/functions/link/handler) 1 related asset
asset src/functions/logout/handler.js 10.4 KiB [emitted] [minimized] (name: src/functions/logout/handler) 1 related asset
asset src/functions/login/handler.js 10.4 KiB [emitted] [minimized] (name: src/functions/login/handler) 1 related asset
asset src/functions/admin/randomise/handler.js 3.57 KiB [emitted] [minimized] (name: src/functions/admin/randomise/handler) 1 related asset
assets by path .warmup/ 5.46 KiB
asset .warmup/outOfOfficeHoursWarmer/index.js 2.73 KiB [emitted] [minimized] (name: .warmup/outOfOfficeHoursWarmer/index) 1 related asset
asset .warmup/officeHoursWarmer/index.js 2.73 KiB [emitted] [minimized] (name: .warmup/officeHoursWarmer/index) 1 related asset
runtime modules 9.15 KiB 40 modules
orphan modules 11 bytes [orphan] 1 module
built modules 198 KiB [built]
modules by path ./src/ 190 KiB
modules by path ./src/libs/ 174 KiB 16 modules
modules by path ./src/functions/ 6.31 KiB 4 modules
modules by path ./src/util/*.ts 7.65 KiB 10 modules
modules by path ./src/middleware/*.ts 1.34 KiB 4 modules
./src/resolvers/api-gateway.ts 280 bytes [built] [code generated]
modules by path ./.warmup/ 7.5 KiB
./.warmup/officeHoursWarmer/index.js 3.75 KiB [built] [code generated]
./.warmup/outOfOfficeHoursWarmer/index.js 3.75 KiB [built] [code generated]
modules by path external "@middy/ 84 bytes
external "@middy/core" 42 bytes [built] [code generated]
external "@middy/http-json-body-parser" 42 bytes [built] [code generated]
WARNING in ./src/libs/user.ts 403:0-42
export 'UserData' (reexported as 'UserData') was not found in '@util/types' (possible exports: )
@ ./src/functions/login/handler.ts 2:0-30 8:20-30
WARNING in ./src/libs/user.ts 403:0-42
export 'UserSerialised' (reexported as 'UserSerialised') was not found in '@util/types' (possible exports: )
@ ./src/functions/login/handler.ts 2:0-30 8:20-30
webpack compiled with 2 warnings in 3341 ms
(node:67778) [DEP_WEBPACK_CHUNK_MODULES_ITERABLE] DeprecationWarning: Chunk.modulesIterable: Use new ChunkGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:67778) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API</pre>
<p>Serverless: <span class="text-yellow">Package lock found - Using locked versions</span></p>
<p>Serverless: <span class="text-yellow">Packing external modules: @middy/[email protected], @middy/[email protected], @sentry/[email protected], @vulcancreative/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]</span></p>
<p>Serverless: <span class="text-yellow">Packaging service...</span></p>
<p>Serverless: <span class="text-yellow">Excluding development dependencies...</span></p>
<p>Serverless Storage: Storage already exists</p>
<p>Serverless: <span class="text-yellow">Uploading CloudFormation file to S3...</span></p>
<p>Serverless: <span class="text-yellow">Uploading artifacts...</span></p>
<p>Serverless: <span class="text-yellow">Uploading service myapp.zip file to S3 (10.28 KB)...</span></p>
<p>Serverless: <span class="text-yellow">Validating template...</span></p>
<p>Serverless: <span class="text-yellow">Updating Stack...</span></p>
<p>Serverless: <span class="text-yellow">Checking Stack update progress...</span></p>
<p>Serverless: <span class="text-yellow">Stack update finished...</span></p>
<p class="text-yellow underline">Service Information</p>
<p><span class="text-yellow">service:</span> myapp</p>
<p><span class="text-yellow">stage:</span> dev</p>
<p><span class="text-yellow">region:</span> us-east-1</p>
<p><span class="text-yellow">stack:</span> myapp-dev</p>
<p><span class="text-yellow">resources:</span> 14</p>
<p class="text-yellow">api keys:</p>
<p class="ml-5">None</p>
<p class="text-yellow">endpoints:</p>
<p class="ml-5">GET - https://3fr81y9fpa.execute-api.us-east-1.amazonaws.com/</p>
<p class="text-yellow">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher</p>
<p class="ml-5">jobsWorker: myapp-dev-worker</p>
<p class="ml-5">warmUpPluginOfficeHoursWarmer: myapp-dev-warmup-plugin-officeHoursWarmer</p>
<p class="ml-5">warmUpPluginOutOfOfficeHoursWarmer: myapp-dev-warmup-plugin-outOfOfficeHoursWarmer</p>
<p class="text-yellow">layers:</p>
<p class="ml-5">None</p>
<p>Serverless Domain Manager: Info: Found apiId: r0oxfy319i for backend.kilo.ai</p>
<p>Serverless Domain Manager: Info: Updated API mapping from '' to '(none)' for backend.kilo.ai</p>
<p>Serverless Domain Manager: Summary: Distribution Domain Name</p>
<p>Serverless Domain Manager: Domain Name: backend.kilo.ai</p>
<p>Serverless Domain Manager: Target Domain: d-s7juq9wqf0.execute-api.us-east-1.amazonaws.com</p>
<p>Serverless Domain Manager: Hosted Zone Id: Z1UJRXOUMOOFQ8</p>
<p>Serverless: <span class="text-yellow">WarmUp: Prewarming up you functions using warmer "officeHoursWarmer".</span></p>
<p>Serverless: <span class="text-yellow">WarmUp: Warmer "officeHoursWarmer" successfully prewarmed your functions.</span></p>
<p>Serverless: <span class="text-yellow">Removing old service artifacts from S3...</span></p>
<p> </p>
<p class="text-gray">Toggle on monitoring with the Serverless Dashboard: run "serverless"</p>
</div>
<div>
<div class="terminal v3 sticky top-0">
<p>$ serverless deploy</p>
<p> </p>
<p>Deploying myapp to stage dev <span class="text-gray">(us-east-1)</span></p>
<p> </p>
<p class="text-gray">/* Note: some progress steps are detailed below for clarity, in reality they will dynamically show and hide */</p>
<p><span class="text-red">⠋</span> [Webpack] Bundling with Webpack</p>
<p><span class="text-red">⠋</span> [Webpack] Packing external modules</p>
<p><span class="text-red">⠋</span> Packaging</p>
<p><span class="text-red">⠋</span> ...</p>
<p><span class="text-red">⠋</span> CloudFormation stack updating (9/9)</p>
<p><span class="text-red">⠋</span> [Domain Manager] Updating API mapping from '' to '(none)' for backend.kilo.ai</p>
<p><span class="text-red">⠋</span> [WarmUp] Warming using the "officeHoursWarmer" warmer</p>
<p><span class="text-red">✔</span> Service deployed to stack myapp-dev <span class="text-gray">(31s)</span></p>
<p> </p>
<p class="text-gray">functions:</p>
<p class="ml-5">publisher: myapp-dev-publisher <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">jobsWorker: myapp-dev-worker <span class="text-gray">(10 KB)</span></p>
<p class="ml-5">warmUpPluginOfficeHoursWarmer: myapp-dev-warmUpPluginOfficeHoursWarmer <span class="text-gray">(10 KB)</span></p>