概要 インターンでお世話になっている企業の社内PCで定期実行されていたスクレイピングを、AWSLambdaに移行した話です。参考程度に見ていただければありがたいです。 この記事ではAWS LambdaでPythonスクレイピングした内容をメール送信する、という一連の処理をAmazon Cloud Watch Eventsを用いて定期実行させます。最終的にServerless Frameworkを用いてデプロイするところまで紹介します。 開発環境 MacOS Mojave 10.14.4 Python3.7 Serverless Framework 1.45.1 Docker 18.09.2(必須というわけではないです) 手順 1. インストール まずはこの記事を参考に、serverless-chromium、chromedriver、seleniumのインストールを行いました。 AWS L