はじめに この投稿では以下の内容を説明しています。 AWS Lambda に Headless Chrome をインストールし、キャプチャした画像を S3 にアップロードします。 自動化スクリプトは Puppeteer を使用します。 何もしないと日本語が文字化けして豆腐が表示されるので日本語のフォントが Lambda 実行環境の Headless Chrome で表示できるようにします。 前提条件 Lambda 実行環境で Node v8.10 が実行できること S3 バケットと accessKeyId, secretAccessKey 使用するパッケージ @serverless-chrome/lambda@1.0.0-38 puppeteer@1.2.0 aws-sdk@2.304.0 プロジェクトの作成 パッケージをインストール 必要なパッケージをインストールしていきます。 serv