Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS Step Functions で マネコンとCDKの二刀流!

AWS Step Functions で マネコンとCDKの二刀流!

#jawsug_cdk

Avatar for Kazuki Miura

Kazuki Miura

April 01, 2025
Tweet

More Decks by Kazuki Miura

Other Decks in Technology

Transcript

  1. 2025年 4月 1日 マネコン支部!? VS CDK支部 AWS Step Functions で

    マネコンとCDKの二刀流! JAWS-UG CDK支部 株式会社ヘプタゴン 三浦一樹
  2. 自己紹介 株式会社ヘプタゴン クラウドアーキテクト AWS Step Functions 北海道札幌市 JAWS-UG 札幌 Media-JAWS

    JAWS-UG 事務局 会社 ロール 好きな AWSサービス 居住地 コミュニティ 三浦一樹 CDK支部 勉強中 (いろいろ教えてください!)
  3. AWS Management Console AWS Cloud Development Kit JSON script CDK

    https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.DefinitionBody.html JSON そのまま読み込めるコンストラクトがあった
  4. どっちもIAM作ってくれるけど、違いはありそう { "Version": "2012-10-17", "Statement": [ { "Action": "lambda:InvokeFunction", "Resource":

    [ "arn:aws:lambda:ap-northeast-1:182399705063:function:StepStack-CheckAddressFunctionF0C6D891-ruXxTjygZhtV", "arn:aws:lambda:ap-northeast-1:182399705063:function:StepStack-CheckIdentityFunction0057238E-okGf3fCH1fGL", "arn:aws:lambda:ap-northeast-1:182399705063:function:StepStack-CheckAddressFunctionF0C6D891-ruXxTjygZhtV:*", "arn:aws:lambda:ap-northeast-1:182399705063:function:StepStack-CheckIdentityFunction0057238E-okGf3fCH1fGL:*" ], "Effect": "Allow" }, { "Action": [ "dynamodb:BatchWriteItem", "dynamodb:DeleteItem", "dynamodb:DescribeTable", "dynamodb:PutItem", "dynamodb:UpdateItem" ], "Resource": [ "arn:aws:dynamodb:ap-northeast-1:182399705063:table/StepStack-AccountsTable81C15AE5-MPRF8BUHHX1P" ], "Effect": "Allow" }, { "Action": [ "sqs:GetQueueAttributes", "sqs:GetQueueUrl", "sqs:SendMessage" ], "Resource": "arn:aws:sqs:ap-northeast-1:182399705063:StepStack-HomeInsuranceInterestQueue688681B0-GwLYm4fZdqEb", "Effect": "Allow" }, { "Action": "sns:Publish", "Resource": "arn:aws:sns:ap-northeast-1:182399705063:StepStack-CustomerNotificationTopicD2C22A10-B4TvOd36q667", "Effect": "Allow" } ] } CDK が作ってくれたやつ Step Fucntions が作ってくれたやつ
  5. どっちもIAM作ってくれるけど、違いはありそう { "Action": [ "dynamodb:BatchWriteItem", "dynamodb:DeleteItem", "dynamodb:DescribeTable", "dynamodb:PutItem", "dynamodb:UpdateItem" ],

    "Resource": [ "arn:aws:dynamodb:ap-northeast-1:182399705063:table/aaaaaa" ], "Effect": "Allow" } } CDK が作ってくれたやつ Step Functions が作ってくれたやつ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem"