[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

相关推荐
Geek-Chow8 小时前
Connecting kubectl to a Private EKS Cluster Over an Internal Domain
kubernetes·k8s·aws
Geek-Chow9 小时前
A Practical Tour of AWS Networking: VPCs, Subnets, Gateways, and More
网络·aws
AOwhisky14 小时前
Linux(CentOS)系统管理入门笔记(第九期)——文件权限进阶:SUIDSGIDSticky、ACL 与 chattr
linux·运维·笔记·centos·云计算·文件权限管理
Geek-Chow1 天前
Assuming an AWS IAM Role via Federation
云计算·aws
全云在线allcloudonline2 天前
上海阿里云代理商怎么选?跨区域交付能力核验清单
阿里云·云计算·企业上云
Qianyunzhiyun2 天前
AWS EC2实例启动失败?常见报错和解决办法
云计算·aws
Qianyunzhiyun2 天前
AWS EBS快照怎么创建?服务器备份详细教程
服务器·云计算·aws
百胜软件@百胜软件3 天前
零点零一×百胜E3+业务智能中台项目启动,中台赋能客制化机械键盘品牌“加数”发展
大数据·云计算
skywalk81633 天前
如何在FreeBSD的Linux仿真环境中运行GUI命令
云计算·腾讯云