[AWS] stepfunctions-local

本质是本地docker,只支持异步调用

  1. run aws-stepfunctions-local

    docker run -p 8083:8083
    --mount type=bind,readonly,source=/path/MockConfigFile.json,destination=/home/StepFunctionsLocal/MockConfigFile.json
    -e SFN_MOCK_CONFIG="/home/StepFunctionsLocal/MockConfigFile.json"
    --env-file /path/aws-stepfunctions-local-credentials.txt
    amazon/aws-stepfunctions-local

  2. Create a state machine

    aws stepfunctions create-state-machine --endpoint-url http://localhost:8083
    --name "sf-noDependencies"
    --definition "{"Comment":"A description of my state machine","StartAt":"Pass","States":{"Pass":{"Type":"Pass","Next":"Success","Result":{"output":"hello word"}},"Success":{"Type":"Succeed"}}}"
    --role-arn "arn:aws:iam::012345678901:role/DummyRole"

    return
    {
    "stateMachineArn": "arn:aws:states:us-east-1:123456789012:stateMachine:sf-noDependencies",
    "creationDate": "2024-04-23T09:21:28.168000+08:00"
    }

  • run sf-noDependencies

    aws stepfunctions start-execution --endpoint-url http://localhost:8083 --state-machine-arn arn:aws:states:us-east-1:123456789012:stateMachine:sf-noDependencies

    return
    {
    "executionArn": "arn:aws:states:us-east-1:123456789012:execution:sf-noDependencies:37c65018-25db-4d92-9aee-6e319b1cf5b7",
    "startDate": "2024-04-22T15:08:15.401000+08:00"
    }

  • describe-execution

    aws stepfunctions describe-execution --endpoint http://localhost:8083 --execution-arn arn:aws:states:us-east-1:123456789012:execution:sf-noDependencies:37c65018-25db-4d92-9aee-6e319b1cf5b7

相关推荐
KevinPedri20 小时前
API创建指定版本k8s集群
容器·云计算
S***q1921 天前
云计算资源
云计算
8***B1 天前
云计算总结
云计算
q***T5831 天前
云计算趋势
云计算
6***3491 天前
云计算书籍
云计算
Q***f6351 天前
云计算案例分析
云计算
不会写程序的未来程序员1 天前
[特殊字符]pull-aliyun:一键拉取阿里云私有镜像并简化命名
阿里云·云计算
Robpubking2 天前
AWS 中 S3 的 server-side encryption 解释与说明
运维·aws
J***Q2922 天前
云计算展望
云计算
u***09642 天前
云计算实战
云计算