AWS Cloud Development Kit(CDK)(Python)を使って「VPC+Sagemaker+Lambda」環境構築してみた(Lambda編) どーもsutoです。 前回の記事でAWS Cloud Development Kit(CDK)を使ってPythonコードでSagemakerノートブックインスタンス構築まで行ってきました。 前々回のVPC編はこちらです。 今回はsagemakerのノートブックインスタンスをスケジュール停止するLambda関数を追加していきます。 はじめに 今回、自分のアカウントで機械学習検証用環境のインフラを構築し、いつでも環境のデプロイ/破棄ができるように自動化&コード管理したい、というモチベからAWS CDKを本格的に触ってみることにしました。 本検証の目標 AWS CDKのインストールと初期設定、VPC構築 Sagemakerのノートブッ