My TypeScript PDF generator with Puppeteer works locally but fails on AWS Lambda Docker deployment due to missing shared libraries. See the examples below:
const browserHandle = await require('puppeteer').launch({
headless: true,
args: ['--no-sandbox', '--disable-gpu'],
executablePath: '/usr/bin/chromium'
});
const pageHandle = await browserHandle.newPage();
FROM public.ecr.aws/lambda/nodejs:14
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run compile
CMD ["dist/index.js"]