Skip to content

Commit a03e35a

Browse files
MEPalmajoe4dev
authored andcommitted
imp delay params and timeouts
1 parent 7c5900c commit a03e35a

File tree

8 files changed

+28
-15
lines changed

8 files changed

+28
-15
lines changed

lambda-debug-mode/java/base-enable-lambda-debug-mode/run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ done
3939

4040
# Invoke the Lambda function.
4141
echo "Invoking the Lambda function."
42+
AWS_MAX_ATTEMPTS=1 \
4243
awslocal lambda invoke \
43-
--function-name function-one \
44-
test.lambda.log \
45-
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for function-one."}'
44+
--cli-connect-timeout 3600 \
45+
--cli-read-timeout 3600 \
46+
--function-name "function_one" \
47+
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for function-one."}' \
48+
/dev/stdout 2>/dev/stderr
4649

lambda-debug-mode/python/base-concurrent-lambda-debug-mode/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def handler(event, context):
1111
return event
1212

1313

14-
def wait_for_debug_client(timeout=15):
14+
def wait_for_debug_client(timeout=3600):
1515
"""Utility function to enable debugging with Visual Studio Code"""
1616
import time, threading
1717
import sys, glob

lambda-debug-mode/python/base-concurrent-lambda-debug-mode/run.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ done
3838
# Invoke the Lambda function 3 times every 5 seconds.
3939
for i in {1..3}; do
4040
echo "Invoking the Lambda function, attempt $i."
41+
AWS_MAX_ATTEMPTS=1 \
4142
awslocal lambda invoke \
42-
--function-name function-one \
43-
test.lambda.$i.log \
44-
--payload "{\"message\": \"Testing Lambda Debug Mode lifting the 1-second timeout for function-one. Attempt $i.\"}" &
43+
--cli-connect-timeout 3600 \
44+
--cli-read-timeout 3600 \
45+
--function-name "function_one" \
46+
--payload "{\"message\": \"Testing Lambda Debug Mode lifting the 1-second timeout for function-one. Attempt $i.\"}" \
47+
/dev/stdout 2>/dev/stderr &
4548
sleep 5
4649
done
50+

lambda-debug-mode/python/base-enable-lambda-debug-mode/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def handler(event, context):
1111
return event
1212

1313

14-
def wait_for_debug_client(timeout=15):
14+
def wait_for_debug_client(timeout=3600):
1515
"""Utility function to enable debugging with Visual Studio Code"""
1616
import time, threading
1717
import sys, glob

lambda-debug-mode/python/base-enable-lambda-debug-mode/run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ done
3737

3838
# Invoke the Lambda function.
3939
echo "Invoking the Lambda function."
40+
AWS_MAX_ATTEMPTS=1 \
4041
awslocal lambda invoke \
41-
--function-name function-one \
42-
test.lambda.log \
43-
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for function-one."}'
42+
--cli-connect-timeout 3600 \
43+
--cli-read-timeout 3600 \
44+
--function-name "function_one" \
45+
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for function-one."}' \
46+
/dev/stdout 2>/dev/stderr
4447

lambda-debug-mode/python/base-multiple-lambda-debug-mode/handler_function_one.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def handler(event, context):
1414
return event
1515

1616

17-
def wait_for_debug_client(timeout=15):
17+
def wait_for_debug_client(timeout=3600):
1818
"""Utility function to enable debugging with Visual Studio Code"""
1919
import time, threading
2020
import sys, glob

lambda-debug-mode/python/base-multiple-lambda-debug-mode/handler_function_two.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def handler(event, context):
1414
return event
1515

1616

17-
def wait_for_debug_client(timeout=15):
17+
def wait_for_debug_client(timeout=3600):
1818
"""Utility function to enable debugging with Visual Studio Code"""
1919
import time, threading
2020
import sys, glob

lambda-debug-mode/python/base-multiple-lambda-debug-mode/run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ done
5454
# Invoke the Lambda functions in parallel
5555
for function_name in "${FUNCTION_NAMES[@]}"; do
5656
echo "Invoking the Lambda function $function_name."
57+
AWS_MAX_ATTEMPTS=1 \
5758
awslocal lambda invoke \
59+
--cli-connect-timeout 3600 \
60+
--cli-read-timeout 3600 \
5861
--function-name "$function_name" \
59-
test.${function_name}.lambda.log \
60-
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for '"$function_name"'. "}' &
62+
--payload '{"message": "Testing Lambda Debug Mode lifting the 1-second timeout for '"$function_name"'. "}' \
63+
/dev/stdout 2>/dev/stderr &
6164
done
6265

6366
# Wait for all invocations to complete

0 commit comments

Comments
 (0)