こんにちは。プロダクトグループのさかいゅです。 CDK(Cloud Development Kit)で実装したリソースをローカル環境で実行できるように、ローカル開発環境について調査しました。 公式ドキュメントにSAM CLIを利用してローカル環境で実行する例を参考にローカル開発環境を構築してみましたので、紹介させていただきます。 バージョン情報 AWS CLI 1.16.220 CDK 1.13.1 SAM CLI 0.22.0 Docker 19.03.2 Visual Studio Code 1.39.2 概要 CDKで実装した、API Gateway + Lambda + DynamoDBでサーバーレスな構成のWebAPIをSAM CLIとDynamoDB Localを利用してローカル開発環境を作成します。 プロジェクトの作成 CDKのプロジェクトを作成し、必要なパッケージをインスト