Deysgroup
Deysgroup

Reputation: 93

Headless Chrome Python 3.8 on AWS Lambda - unexpectedly exited. Status code was: 127

I am trying to install / run Head-Less Chrome in AWS Lambda but getting the following Error when I test it through Lambda.

"errorMessage": "Message: Service /tmp/bin/chromedriver unexpectedly exited. Status code was: 127\n", "errorType": "WebDriverException"

I am using ChromeDriver 83.0.4103.39 for Linux.

Steps performed in Python:

  1. Created /tmp/bin in Lambda
  2. Copy Chrome Driver to /tmp/bin
  3. Changed the permission to 0777

Python Code:

Throwing error on the following line -

driver = webdriver.Chrome(chrome_options=chrome_options, executable_path= "/tmp/bin/" + chrome_linux_driver)

Code is working fine when I am running under windows with same windows Chrome driver.

Any help is really appreciated.

Upvotes: 9

Views: 1759

Answers (1)

enes bayram
enes bayram

Reputation: 1

The error might come from the fact that the chromedriver version and the headless chromium binary you are using aren't the same so make sure to download the same version for both

another reson could be that you are not using linux chromedriver and headless chromium and since lambda work on linux the code won't work

hopefully this was useful.

Upvotes: 0

Related Questions