-
Notifications
You must be signed in to change notification settings - Fork 152
/
index.html
1053 lines (1037 loc) · 30.9 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>
<meta charset="utf-8">
<title>AWS Lambda Cheatsheet</title>
<body>
<h1>AWS Lambda Cheatsheet</h1>
<h3>This cheatsheet is probably based on Python</h3>
<br>
<table border="1">
<tr>
<th colspan="4">Runtime Versions</th>
</tr>
<tr>
<th>Type</th>
<th>Versions</th>
<th>AWS SDK</th>
<th>Operating System</th>
</tr>
<!-- NodeJS -->
<tr>
<td rowspan="2">Node.js</td>
<td>nodejs10.x</td>
<td>(JavaScript) 2.712.0</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>nodejs12.x</td>
<td>(JavaScript) 2.712.0</td>
<td>Amazon Linux 2</td>
</tr>
<!-- Java -->
<tr>
<td rowspan="3">Java</td>
<td>java11</td>
<td>(JDK) amazon-corretto-11</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>java8.a12</td>
<td>(JDK) amazon-corretto-8</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>java8</td>
<td>(JDK) java-1.8.0-openjdk</td>
<td>Amazon Linux</td>
</tr>
<!-- Python -->
<tr>
<td rowspan="4">Python</td>
<td>python3.8</td>
<td>(Python) boto3-1.14.40 botocore-1.17.40</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>python3.7</td>
<td>(Python) boto3-1.14.40 botocore-1.17.40</td>
<td>Amazon Linux</td>
</tr>
<tr>
<td>python3.6</td>
<td>(Python) boto3-1.14.40 botocore-1.17.40</td>
<td>Amazon Linux</td>
</tr>
<tr>
<td>python2.7</td>
<td>(Python) boto3-1.14.40 botocore-1.17.40</td>
<td>Amazon Linux</td>
</tr>
<!-- Ruby -->
<tr>
<td rowspan="2">Ruby</td>
<td>ruby2.7</td><td>(Ruby) 3.0.3</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>ruby2.5</td>
<td>(Ruby) 3.0.3</td>
<td>Amazon Linux</td>
</tr>
<!-- .NET -->
<tr>
<td rowspan="2">.NET Core</td>
<td>dotnetcore3.1</td>
<td>--</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>dotnetcore2.1</td>
<td>--</td>
<td>Amazon Linux</td>
</tr>
<!-- Go -->
<tr>
<td>Go</td>
<td>go1.x</td>
<td>--</td>
<td>Amazon Linux</td>
</tr>
<!-- Custom runtime -->
<tr>
<td rowspan="2">Custom Runtime</td>
<td>provided.al2</td>
<td>--</td>
<td>Amazon Linux 2</td>
</tr>
<tr>
<td>provided</td>
<td>--</td>
<td>Amazon Linux</td>
</tr>
</table>
<br>
<table border="1">
<tr>
<th colspan="4">Available Operating System</th>
</tr>
<tr>
<th>Type</th>
<th>Image</th>
<th>Kernel</th>
</tr>
<tr>
<td>Amazon Linux</td>
<td>amzn-ami-hvm-2018.03.0.20181129-x86_64-gp2</td>
<td>4.14.171-105.231.amzn1.x86_64</td>
</tr>
<tr>
<td>Amazon Linux 2</td>
<td>Custom</td>
<td>4.14.165-102.205.amzn2.x86_64</td>
</tr>
</table>
<br>
<table border="1">
<tr>
<th colspan="3">Settings | Limits</th>
</tr>
<tr>
<th>Description</th>
<th>Settings | Limits | Explained</th>
<th>Can be increased</th>
</tr>
<tr>
<td>
<b>Writable Path & Space</b>
</td>
<td>/tmp/ 512 MB</td>
<td>--</td>
</tr>
<tr>
<td><b>Default Memory & Execution Time</b></td>
<td>128 MB Memory<br>3 Second Timeout</td>
<td>--</td>
</tr>
<tr>
<td><b>Max Memory & Execution Time</b></td>
<td>3008 MB Memory (64 MB increments)<br>15 Minutes Timeout</td>
<td>--</td>
</tr>
<tr>
<td><b>Number of processes and threads (Total)</b></td>
<td>1024</td>
<td>--</td>
</tr>
<tr>
<td><b>Number of File descriptors (Total)</b></td>
<td>1024</td>
<td>--</td>
</tr>
<tr>
<td><b>Maximum deployment package size</b></td>
<td>
<br>50 MB (zipped, direct upload)
<br>250 MB (unzipped, including layers)
</td>
<td>--</td>
</tr>
<tr>
<td><b>Maximum deployment package size for console editor</b></td>
<td>3 MB</td>
<td>--</td>
</tr>
<tr>
<td><b>Total size of deployment package per region</b></td>
<td>75 GB</td>
<td>Can be increased upto Terabytes</td>
</tr>
<tr>
<td><b>Maximum size of environment variables set</b></td>
<td>4 KB</td>
<td>--</td>
</tr>
<tr>
<td><b>Maximum function Layers</b></td>
<td>5 layers</td>
<td>--</td>
</tr>
<tr>
<td><b>Environment variables size</b></td>
<td>4 KB</td>
<td>--</td>
</tr>
<tr>
<td><b>Maximum test events (Console editor)</b></td>
<td>10</td>
<td>--</td>
</tr>
<tr>
<td><b>Invocation payload Limit (request and response)</b></td>
<td>6 MB (synchronous)<br>256 KB (asynchronous)</td>
<td>--</td>
</tr>
<tr>
<td><b>Elastic network interpaces per VPC</b></td>
<td>250</td>
<td>Can be increased upto Hundreds</td>
</tr>
<tr>
<td><b>Lambda Destinations</b></td>
<td>
<ul>
<li>It sends invocation records to a destination (SQS queue, SNS topic, Lambda function, or EventBridge event bus) when the lambda function is invoked asynchronously</li>
<li>It also supports stream invocation</li>
</ul>
</td>
<td>Can be increased upto Hundreds</td>
</tr>
<tr>
<td><b>Monitoring tools</b></td>
<td>
<ul>
<li>(Default) CloudWatch Logs stream</li>
<li>AWS X-Ray</li>
<li>CloudWatch Lambda Insights (preview)</li>
</ul>
</td>
<td>--</td>
</tr>
<tr>
<td><b>VPC</b></td>
<td>
<ul>
<li>When you enable VPC, your Lambda function will lose default internet access</li>
<li>If you require external internet access for your function, ensure that your security group allows outbound connections and that your VPC has a NAT gateway</li>
</ul>
</td>
<td>--</td>
</tr>
<tr>
<td><b>Concurrency</b></td>
<td>
<ul>
<li>Concurrent Execution refers to the execution of number of function at a given time. By default the limit is 1000 across all function within a given region</li>
<li>AWS Lambda keeps 100 for the unreserved function</li>
<li>So, if there are 1000 then you can select from 900 and reserve concurrency for selected function and rest 100 is used for the unreserved function</li>
</ul>
<td>Can be increased upto Hundreds of thousands</td>
</tr>
<tr>
<td><b>DLQ (Dead Letter Queue)</td>
<td>
<ul>
<li>Failed Lambda is invoked twice by default and the event is discarded</li>
<li>DLQ instruct lamnda to send unprocessed events to AWS SQS or AWS SNS</li>
<li>DLQ helps you troubleshoot and examine the unprocessed request</li>
</ul>
<td>--</td>
</tr>
<tr>
<td><b>Throttle</b></td>
<td>
<ul>
<li>Throttle will set reserved concurrency of the function to zero and it will throttle all future invocation</li>
<li>If the function is throttled then it will fail to run</li>
<li>If the fucntion is ran from Lambda console then it will throw "Calling the Invoke API failed with message: Rate Exceeded."</li>
</ul>
<td>--</td>
</tr>
<tr>
<td><b>File system</b></td>
<td>
<ul>
<li><a href="https://www.youtube.com/playlist?list=PL5KTLzN85O4L0rYTtGVKxPr4yQ5oHMYOn">File system</a> will allow you to add Amazon EFS file system, which provides distributed network storage for the instances of the function</li>
<li>To connect to the file system, you need to connect your lambda function to VPC</li>
</ul>
<td>--</td>
</tr>
<tr>
<td><b>State machines</b></td>
<td>
<ul>
<li>Step Functions state machines which orchestrate this function</li>
<li>The Step Functions state machines page lists all state machines in the current AWS region with at least one workflow step that invokes a Lambda function</li>
</ul>
<td>--</td>
</tr>
<tr>
<td><b>Database proxies</b></td>
<td>
<ul>
<li>Database proxy manages a pool of database connections and relays queries from a function</li>
<li>It uses Secrets Manager secret to access credentials for a database</li>
<li>To connect to the file system, you need to connect your lambda function to VPC</li>
</ul>
<td>--</td>
</tr>
</table>
<br>
<table border="1">
<tr>
<th colspan="2">Execution | Invoke | Tweaks</th>
</tr>
<tr>
<td>A Lambda can invoke another Lambda</td>
<td><a href="https://youtu.be/5QwrseYLwNM">Yes</a></td>
</tr>
<tr>
<td>A Lambda in one region can invoke another lambda in other region</td>
<td>Yes</td>
</tr>
<tr>
<td>A Lambda can invoke same Lambda</td>
<td>Yes</td>
</tr>
<tr>
<td>Exceed 15 minutes execution time</td>
<td>Yes (Can Tweak around)</td>
</tr>
<tr>
<td>How to exceed 5 minutes execution time</td>
<td> <a href="http://www.thetechnologyupdates.com/aws-lambda-going-beyond-5-minutes-execution/">Self-Invoke</a> , SNS, SQS</td>
</tr>
<tr>
<td>Asynchronous Execution</td>
<td>Yes <a href="http://www.thetechnologyupdates.com/aws-lambda-execute-lambda-asynchronously-parallel/">(Async Exec)</a></td>
</tr>
<tr>
<td>Invoke same Lamba with different version</td>
<td>Yes</td>
</tr>
<tr>
<td>Setting Lambda Invoke Max Retry attempt to 0</td>
<td><a href="https://youtu.be/ySVz-9EOKbw">Yes</a></td>
</tr>
</table>
<br>
<table border=1>
<tr>
<th colspan=2>Execution Role (Common Execution Role Available)</th>
</tr>
<tr>
<td><b>AWSLambdaBasicExecutionRole</b></td>
<td>Grants permissions only for the Amazon CloudWatch Logs actions to write logs.</td>
</tr>
<tr>
<td><b>AWSLambdaKinesisExecutionRole</b></td>
<td>Grants permissions for Amazon Kinesis Streams actions, and CloudWatch Logs actions.</td>
</tr>
<tr>
<td><b>AWSLambdaDynamoDBExecutionRole</b></td>
<td>Grants permissions for DynamoDB streams actions and CloudWatch Logs actions.</td>
</tr>
<tr>
<td><b>AWSLambdaVPCAccessExecutionRole</b></td>
<td>Grants permissions for Amazon Elastic Compute Cloud (Amazon EC2) actions to manage elastic network interfaces (ENIs).</td>
</tr>
</table>
<br>
<b>Add new permission</b>
import boto3
client = boto3.client('lambda')
# Role ARN can be found on the top right corner of the Lambda function
response = client.add_permission(
FunctionName='string',
StatementId='string',
Action='string',
Principal='string',
SourceArn='string',
SourceAccount='string',
EventSourceToken='string',
Qualifier='string'
)
<br>
<table border=1>
<tr>
<th colspan="2">Execution | Invoke | Tweaks</th>
</tr>
<tr>
<td>A Lambda can invoke another Lambda</td>
<td>Yes</td>
</tr>
<tr>
<td>A Lambda in one region can invoke another lambda in other region</td>
<td>Yes</td>
</tr>
<tr>
<td>A Lambda can invoke same Lambda</td>
<td>Yes</td>
</tr>
<tr>
<td>Exceed 5 minutes execution time</td>
<td>Yes (Can Tweak around)</td>
</tr>
<tr>
<td>How to exceed 5 minutes execution time</td>
<td> <a href="http://www.thetechnologyupdates.com/aws-lambda-going-beyond-5-minutes-execution/">Self-Invoke</a> , SNS, SQS</td>
</tr>
<tr>
<td>Asynchronous Execution</td>
<td>Yes <a href="http://www.thetechnologyupdates.com/aws-lambda-execute-lambda-asynchronously-parallel/">(Async Exec)</a></td>
</tr>
<tr>
<td>Invoke same Lamba with different version</td>
<td>Yes</td>
</tr>
<tr>
<td>Invoke Request Max Payload Size (RequestResponse/synrchronous invocation)</td>
<td>6 MB</td>
</tr>
<tr>
<td>Invoke Request Max Payload Size (Event/asynchronous invocation)</td>
<td>128 KB</td>
</tr>
</table>
<br>
<div>
<b>Setting Lambda Invoke Max Retry attempt to 0</b><br>
<code>
import boto3, botocore<br>
config = botocore.config.Config(connect_timeout=300, read_timeout=300)<br>
invokeLam = boto3.client('lambda', region_name='us-east-1', config=config)<br>
invokeLam.meta.events._unique_id_handlers['retry-config-lambda']['handler']._checker.__dict__['_max_attempts'] = 0<br>
</code>
</div>
<br>
<table border=1>
<tr>
<th>Triggers</th>
<th>Description</th>
<th>Requirement</th>
</tr>
<tr>
<td><b>API Gateway</b></td>
<td>Trigger AWS Lambda function over HTTPS</td>
<td>API Endpoint name<br>API Endpoint Deployment Stage<br>Security Role</td>
</tr>
<tr>
<td><b>AWS IoT</b></td>
<td>Trigger AWS Lambda for performing specific action by mapping your AWS IoT Dash Button (Cloud Programmable Dash Button)</td>
<td>DSN (Device Serial Number)</td>
</tr>
<tr>
<td><b>Alexa Skill Kit</b></td>
<td>Trigger AWS Lambda to build services that give new skills to Alexa</td>
<td>--</td>
</tr>
<tr>
<td><b>Alexa Smart Home</b></td>
<td>Trigger AWS Lambda with desired skill</td>
<td>Application ID (Skill)</td>
</tr>
<tr>
<td><b>CloudFront</b></td>
<td>Trigger AWS Lambda based on difference CloudFront event.</td>
<td>CloudFront distribution, Cache behaviour, CloudFront event (Origin request/response, Viewer request/response).<br>To set CloudFront trigger, one need to publish the version of Lambda.<br><b>Limitations:</b><br>Runtime is limited to Node.js 6.10<br>/tmp/ space is not available<br>Environment variables, DLQ & Amazon VPC's cannot be used</td>
</tr>
<tr>
<td><b>CloudWatch Events</b></td>
<td>Trigger AWS Lambda on desired time interval (rate(1 day)) or on the state change of EC2, RDS, S3, Health.</td>
<td>Rule based on either Event Pattern (time interval)<br>Schedule Expression (Auto Scaling on events like Instance launch and terminate<br>AWS API call via CloudTrail</td>
</tr>
<tr>
<td><b>CloudWatch Logs</b></td>
<td>Trigger AWS Lambda based on the CloudWatch Logs</td>
<td>Log Group Name</td>
</tr>
<tr>
<td><b>Code Commit</b></td>
<td>Trigger AWS Lambda based on the AWS CodeCommit version control system</td>
<td>Repository Name<br>Event Type</td>
</tr>
<tr>
<td><b>Cognito Sync Trigger</b></td>
<td>Trigger AWS Lambda in response to event, each time the dataset is synchronized</td>
<td>Cognito Identity Pool dataset</td>
</tr>
<tr>
<td><b>DynamoDB</b></td>
<td>Trigger AWS Lambda whenever the DynomoDB table is updated</td>
<td>DynamoDB Table name<br>Batch Size(The largest number of records that AWS Lambda will retrieve from your table at the time of invoking your function. Your function receives an event with all the retrieved records)</td>
</tr>
<tr>
<td><b>Kinesis</b></td>
<td>Trigger AWS Lambda whenever the Kinesis stream is updated</td>
<td>Kinesis Stream<br>Batch Size</td>
</tr>
<tr>
<td><b>S3</b></td>
<td>Trigger AWS Lambda in response to file dropped in S3 bucket</td>
<td>Bucket Name<br>Event Type (Object Removed, Object Created)</td>
</tr>
<tr>
<td><b>SNS</b></td>
<td>Trigger AWS Lambda whenever the message is published to Amazon SNS Topic</td>
<td>SNS Topic</td>
</tr>
</table>
<br>
<table border=1>
<tr>
<th colspan="3">Troubleshooting</th>
</tr>
<tr>
<th>Error</th>
<th>Possible Reason</th>
<th>Solution</th>
</tr>
<tr>
<td>
File "/var/task/lambda_function.py", line 2, in lambda_handler<br>return event['demoevent']<br>
KeyError: 'demoevent'
</td>
<td>
Event does not have the key 'demoevent' or either misspelled
</td>
<td>
Make sure the event is getting the desired key if it is receiving the event from any trigger.<br> Or if the not outside event is passed than check for misspell.<br>Or check the event list by printing event.
</td>
</tr>
<tr>
<td>botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the GetParameters operation: User: arn:aws:dummy::1234:assumed-role/role/ is not authorized to perform: ssm:GetParameters on resource: arn:aws:ssm:dummy</td>
<td>Lacks Permission to access</td>
<td>Assign appropriate permission for accessibility</td>
</tr>
<tr>
<td>ImportError: Missing required dependencies [‘module']</td>
<td>Dependent module is missing</td>
<td>Install/Upload the required module</td>
</tr>
<tr>
<td>sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "host.dummy.region.rds.amazonaws.com" to address: Name or service not known</td>
<td>RDS Host is unavailable</td>
<td>Make sure the RDS instance is up and running.<br>Double check the RDS hostname</td>
</tr>
<tr>
<td>[Errno 32] Broken pipe</td>
<td>Connection is lost (Either from your side or may be some problem from AWS)<br>While invoking another Lambda, if the payload size exceed the mentioned limit</td>
<td>Make sure if you are passing the payload of right size.<br>Check for the connection.</td>
</tr>
<tr>
<td>Unable to import module ‘lambda_function/index’ No module named ‘lambda_function'</td>
<td>Handler configuration is not matching the main file name</td>
<td>Update the handler configuration as per your filename.function_name</td>
</tr>
<tr>
<td>Task timed out after 3.00/300 seconds</td>
<td>Lamda execution is exceeding the desired time limit</td>
<td>If task timeout is less than 300 seconds than it is required to increase the Timeout in configuration.<br>If it is 300 seconds than one can tweak around to <a href="http://www.thetechnologyupdates.com/aws-lambda-going-beyond-5-minutes-execution/">go beyound 5 minutes</a>.</td>
</tr>
<tr>
<td>OperationalError: (psycopg2.OperationalError) terminating connection due to administrator command
SSL connection has been closed unexpectedly</td>
<td>RDS/Database System has been rebooted.<br>In a typical web application using an ORM (SQLAlchemy) Session, the above condition would correspond to a single request failing with a 500 error, then the web application continuing normally beyond that. Hence the approach is “optimistic” in that frequent database restarts are not anticipated.</td>
<td>Give second try</td>
</tr>
<tr>
<td>Error code 429</td>
<td>The function is throttled. Basically the reserved concurrency is set to zero or it have reach the account level throttle. <br>(The function that is invoked synchronous and if it is throttled then it will return 429 error. If the lambda function is invoked asynchronously and if it is throttled then it will retry the throttled event for upto 6 hours.) </td>
<td>Check for the reserved concurrency limit or throttle status for the individual function. Or check for the account level concurrent execution limit</td>
</tr>
</table>
<br>
<h3>AWS Lambda CLI commands</h3>
<br>
<b>Add Permission</b>
<p>It add mention permission to the Lambda function</p>
<b><p>Syntax</p></b>
<code>
add-permission<br>
--function-name <value><br>
--statement-id <value><br>
--action <value><br>
--principal <value><br>
[--source-arn <value>]<br>
[--source-account <value>]<br>
[--event-source-token <value>]<br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
add-permission --function-name functionName --statement-id role-statement-id --action lambda:CreateFunction --principal s3.amazonaws.com
</code>
<br><br>
<b>Create Alias</b>
<p>It creates alias for the given Lambda function name</p>
<b><p>Syntax</p></b>
<code>
create-alias<br>
--function-name <value><br>
--name <value><br>
--function-version <value><br>
[--description <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
create-alias --function-name functionName --name fliasName --function-version version
</code>
<br><br>
<b>Create Event Source Mapping</b>
<p>It identify event-source from Amazon Kinesis stream or an Amazon DynamoDB stream</p>
<code>
create-event-source-mapping<br>
--event-source-arn <value><br>
--function-name <value><br>
[--enabled | --no-enabled]<br>
[--batch-size <value>]<br>
--starting-position <value><br>
[--starting-position-timestamp <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</value>code>
<b><p>Example</p></b>
<code>
create-event-source-mapping --event-source-arn arn:aws:kinesis:us-west-1:1111 --function-name functionName --starting-position LATEST
</code>
<br><br>
<b>Create Function</b>
<p>It creates the new function</p>
<b><p>Syntax</p></b>
<code>
create-function<br>
--function-name <value><br>
--runtime <value><br>
--role <value><br>
--handler <value><br>
[--code <value>]<br>
[--description <value>]<br>
[--timeout <value>]<br>
[--memory-size <value>]<br>
[--publish | --no-publish]<br>
[--vpc-config <value>]<br>
[--dead-letter-config <value>]<br>
[--environment <value>]<br>
[--kms-key-arn <value>]<br>
[--tracing-config <value>]<br>
[--tags <value>]<br>
[--zip-file <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
create-function --function-name functionName --runtime python3.6 --role arn:aws:iam::account-id:role/lambda_basic_execution
--handler main.handler
</code>
<br><br>
<b>Delete Alias</b>
<p>It deletes the alias</p>
<b><p>Syntax</p></b>
<code>
delete-alias<br>
--function-name <value><br>
--name <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
delete-alias --function-name functionName --name aliasName
</code>
<br><br>
<b>Delete Event Source Mapping</b>
<p>It deletes the event source mapping</p>
<b><p>Syntax</p></b>
<code>
delete-event-source-mapping<br>
--uuid <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
delete-event-source-mapping --uuid 12345kxodurf3443
</code>
<br><br>
<b>Delete Function</b>
<p>It will delete the function and all the associated settings</p>
<b><p>Syntax</p></b>
<code>
delete-function<br>
--function-name <value><br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
delete-function --function-name FunctionName
</code>
<br><br>
<b>Get Account Settings</b>
<p>It will fetch the user’s account settings</p>
<b><p>Syntax</p></b>
<code>
get-account-settings<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<br><br>
<b>Get Alias</b>
<p>It returns the desired alias information like description, ARN</p>
<b><p>Syntax</p></b>
<code>
get-alias<br>
--function-name <value><br>
--name <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
get-alias --function-name functionName --name aliasName
</code>
<br><br>
<b>Get Event Source Mapping</b>
<p>It returns the config information for the desired event source mapping</p>
<b><p>Syntax</p></b>
<code>
get-event-source-mapping<br>
--uuid <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
get-event-source-mapping --uuid 12345kxodurf3443
<br><br>
<b>Get Function</b>
<p>It returns the Lambda Function information</p>
<b><p>Syntax</p></b>
<code>
get-function<br>
--function-name <value><br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
get-function --function-name functionName
</code>
<br><br>
<b>Get Function Configuration</b>
<p>It returns the Lambda function configuration</p>
<b><p>Syntax</p></b>
<code>
get-function-configuration<br>
--function-name <value><br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
get-function-configuration --function-name functionName
</code>
<br><br>
<b>Get Policy</b>
<p>It return the linked policy with Lambda function</p>
<b><p>Syntax</p></b>
<code>
get-policy<br>
--function-name <value><br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
get-policy --function-name functionName
</code>
<br><br>
<b>Invoke</b>
<p>It invoke the mention Lambda function name</p>
<b><p>Syntax</p></b>
<code>
invoke<br>
--function-name <value><br>
[--invocation-type <value>]<br>
[--log-type <value>]<br>
[--client-context <value>]<br>
[--payload <value>]<br>
[--qualifier <value>]<br>
</code>
<b><p>Example</p></b>
<code>
invoke --function-name functionName
</code>
<br><br>
<b>List Aliases</b>
<p>It return all the aliases that is created for Lambda function</p>
<b><p>Syntax</p></b>
<code>
list-aliases<br>
--function-name <value><br>
[--function-version <value>]<br>
[--marker <value>]<br>
[--max-items <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
list-aliases --function-name functionName
</code>
<br><br>
<b>List Event Source Mappings</b>
<p>It return all the list event source mappings that is created with create-event-source-mapping</p>
<b><p>Syntax</p></b>
<code>
list-event-source-mappings<br>
[--event-source-arn <value>]<br>
[--function-name <value>]<br>
[--max-items <value>]<br>
[--cli-input-json <value>]<br>
[--starting-token <value>]<br>
[--page-size <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
list-event-source-mappings --event-source-arn arn:aws:arn --function-name functionName
</code>
<br><br>
<b>List Functions</b>
<p>It return all the Lambda function</p>
<b><p>Syntax</p></b>
<code>
list-functions<br>
[--master-region <value>]<br>
[--function-version <value>]<br>
[--max-items <value>]<br>
[--cli-input-json <value>]<br>
[--starting-token <value>]<br>
[--page-size <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
list-functions --master-region us-west-1 --function-version ALL
</code>
<br><br>
<b>List Tags</b>
<p>It return the list of tags that are assigned to the Lambda function</p>
<b><p>Syntax</p></b>
<code>
list-tags<br>
--resource <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
list-tags --resource arn:aws:function
</code>
<br><br>
<b>List Versions by functions</b>
<p>It return all the versions of the desired Lambda function</p>
<b><p>Syntax</p></b>
<code>
list-versions-by-function<br>
--function-name <value><br>
[--marker <value>]<br>
[--max-items <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
list-versions-by-function --function-name functionName
</code>
<br><br>
<b>Publish Version</b>
<p>It publish the version of the Lambda function from $LATEST snapshot</p>
<b><p>Syntax</p></b>
<code>
publish-version<br>
--function-name <value><br>
[--code-sha-256 <value>]<br>
[--description <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
publish-version --function-name functionName
</code>
<br><br>
<b>Remove Permission</b>
<p>It remove the single permission from the policy that is linked with the Lambda function</p>
<b><p>Syntax</p></b>
<code>
remove-permission<br>
--function-name <value><br>
--statement-id <value><br>
[--qualifier <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
remove-permission --function-name functionName --statement-id role-statement-id
</code>
<br><br>
<b>Tag Resource</b>
<p>It creates the tags for the lambda function in the form of key-value pair</p>
<b><p>Syntax</p></b>
<code>
tag-resource<br>
--resource <value><br>
--tags <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
tag-resource --resource arn:aws:arn --tags {‘key’: ‘pair’}
</code>
<br><br>
<b>Untag Resource</b>
<p>It remove tags from the Lambda function</p>
<b><p>Syntax</p></b>
<code>
untag-resource<br>
--resource <value><br>
--tag-keys <value><br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
untag-resource --resource arn:aws:complete --tag-keys [‘key1’, ‘key2’]
</code>
<br><br>
<b>Update Alias</b>
<p>It update the alias name of the desired lambda function</p>
<b><p>Syntax</p></b>
<code>
update-alias<br>
--function-name <value><br>
--name <value><br>
[--function-version <value>]<br>
[--description <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
update-alias --function-name functionName --name aliasName
</code>
<br><br>
<b>Update Event Source Mapping</b>
<p>It updates the event source mapping incase you want to change the existing parameters</p>
<b><p>Syntax</p></b>
<code>
update-event-source-mapping<br>
--uuid <value><br>
[--function-name <value>]<br>
[--enabled | --no-enabled]<br>
[--batch-size <value>]<br>
[--cli-input-json <value>]<br>
[--generate-cli-skeleton <value>]<br>
</code>
<b><p>Example</p></b>
<code>
update-event-source-mapping --uuid 12345kxodurf3443
</code>
<br><br>
<b>Update Function Code</b>
<p>It updates the code of the desired Lambda function</p>
<b><p>Syntax</p></b>
<code>