Skip to content

Commit fa3cd67

Browse files
committed
Add --single-process chromium arg on AWS Lambda
1 parent eb7dfb8 commit fa3cd67

File tree

1 file changed

+6
-0
lines changed
  • repos/kaleido/py/kaleido/scopes

1 file changed

+6
-0
lines changed

repos/kaleido/py/kaleido/scopes/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ class BaseScope(object):
1818
# flags to configure scope
1919
_scope_flags = ()
2020

21+
# Specify default chromium arguments
2122
_default_chromium_args = (
2223
"--disable-gpu",
2324
"--allow-file-access-from-files",
2425
"--disable-breakpad",
2526
"--disable-dev-shm-usage",
27+
) + (
28+
# Add "--single-process" when running on AWS Lambda. Flag is described
29+
# as for debugging only by the chromium project, but it's the only way to get
30+
# chromium headless working on Lambda
31+
("--single-process",) if os.environ.get("LAMBDA_RUNTIME_DIR", None) else ()
2632
)
2733

2834
_scope_chromium_args = ()

0 commit comments

Comments
 (0)