hatajoe / step-functions-and-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

step-functions and lambda example

prerequisite

% cd lambda/helloworld
% make
% cd ../../
% docker-compose up -d
% aws stepfunctions --endpoint http://localhost:8083 create-state-machine --definition "{\
    \"Comment\": \"Hello World\",\
    \"StartAt\": \"HelloWorld\",\
    \"States\": {\
      \"HelloWorld\": {\
        \"Type\": \"Task\",\
        \"Resource\": \"arn:aws:lambda:ap-northeast-1:123456789012:function:HelloWorld\",\
        \"Parameters\": {\
          \"name.$\": \"$.name\"
        },\
        \"End\": true\
      }\
    }\
  }\
  }}" --name "HelloWorld" --role-arn "arn:aws:iam::012345678901:role/DummyRole"

run

% aws stepfunctions --endpoint http://localhost:8083 start-execution --state-machine 'arn:aws:states:ap-northeast-1:123456789012:stateMachine:HelloWorld' --input "{\"name\": \"hatajoe\"}"

About


Languages

Language:Go 40.1%Language:Dockerfile 34.9%Language:Shell 18.3%Language:Makefile 6.7%