主に自分用メモ。
client->api gateway->youtube apiとかやりたい。
まずlamda, api gaytewayを触ってみる
下記を見ればだいたいわかる。
ゼロから作りながら覚えるAPI Gateway環境構築
lamdaでのコードをローカルで作る際にはこちらを参考にした。
https://qiita.com/toshihirock/items/d28505442526e0ae7793
次にapi gateway->youtube apiをやってみる
ココやる上で、手元ではうまくresponse返ってきてるが、lamdaのところではresponseがnullになってて、なんでだろうとしていた。
結論は、event handlerが非同期的に処理される?ので、promiseとかでちゃんと作って値を返さないとだめだった。
youtube用には下記のnpmを利用した。
https://github.com/nodenica/youtube-node
外から叩いてみて、値が返ってたらOK!