1

I'm trying to get a simple web scraper to run-in AWS lambda but I'm facing a blocker where the chromedriver I'm using which is the latest version exists with the following error

selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

I've tried different webDrivers but still getting the same error. Any ideas why this might be happening? Note: I'm using AWS Lambda Layers to store the binary and pointing to it through

chrome_driver_path = "/opt/chromedriver"
options = Options()
options.add_argument('--headless')
options.add_argument("user-agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36")

driver = webdriver.Chrome(executable_path=chrome_driver_path, chrome_options=options)
E_K
  • 2,159
  • 23
  • 39

1 Answers1

0

I'd suggest you create a custom image with the chrome driver working https://docs.aws.amazon.com/lambda/latest/dg/images-create.html

Banjo Obayomi
  • 1,636
  • 15
  • 17