这个错误提示是函数在运行时达到了 AWS Lambda 的时间限制,导致函数超时。默认的运行时间限制是 3 秒钟,但是可以通过 AWS 控制台或者 AWS CLI 来修改这个限制。在这个代码中,可能是因为 Puppeteer 加载页面和截图需要的时间较长,导致函数超时。你可以尝试增加函数的运行时间限制,或者优化代码以加快运行速度。

我的代码调用时报错const fs = requirefs;const path = requirepath;const puppeteer = requirepuppeteer;const launchBrowser = async = const browser = await puppeteerlaunch args --disable-gpu --disa

原文地址: https://www.cveoy.top/t/topic/gKT2 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录