この記事はNextremer Advent Calendar 2018の2日目の記事です。 表題の通り、mecab-ipadic-NEologd を AWS Lambda で使えるようにしたという内容です。 困難 NEologd 辞書が標準で 900 MB 程度ある Lambda にはデプロイパッケージを zip で上げることが可能であるが、unzip 後、250 MB 以下でなければいけないという制限がある Lambda には実行時、一時ファイル領域(/tmp)が用意されているが、容量 512 MB までである NEologd を縮小版(--eliminate-redundant-entry オプション)で生成しても 400 MB 程度になる 既存のソリューション: s3 に辞書を置いておく こちらに、s3 使った方法がまとまっています。 https://speakerdeck.com/