StepFunctions で Lambdaを制御するシステムを AWS CDK で構築する
試行錯誤しているうちにChromeのタブが増えすぎてどのサイトを見ていたか忘れてしまう悪い癖があるので、どんな思考回路でどのリンクを参考にしたかまとめる。
試行錯誤
まず CDK で簡単にリソースを作成する(S3)
とりあえずこれ参考にやってみる。
https://dev.classmethod.jp/articles/trying-aws-cdk-tutorial-with-typescript/
と思ったが依存関係がごちゃごちゃして意味がわからないので綺麗にする。
https://qiita.com/non0311/items/664cf74d9ff4bad9cf46
Lambda 作る
こいつ参考にpythonのLambda構築する。
https://dev.classmethod.jp/articles/aws-cdk-lambda-dependency-at-python/
デプロイしたが怒られた。
TestCdkStack failed: Error: This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://unknown-account/unknown-region")
指示に従う。
できた。
StepFunctions(本命)
こいつ参考に作成。stepfunctionについても知らないこと多かったから助かった。
https://dev.classmethod.jp/articles/developers-io-2020-connect-aws-cdk-aws-step-functions/
感想
嬉しい。