[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

相关推荐
文青小兵6 小时前
Linux云计算——docker compose haibor elfk (四)
linux·服务器·docker·云计算
文青小兵7 小时前
Linux云计算——docker部分技术、命令 (一)
linux·docker·云计算
文青小兵7 小时前
Linux云计算——docker 监控(五)
linux·docker·云计算·grafana·prometheus
文青小兵8 小时前
Linux云计算——docker镜像(三)
linux·docker·云计算
文青小兵9 小时前
Linux云计算——docker 网络和部分挂载(二)
linux·docker·云计算
AOwhisky9 小时前
Ceph系列第四期:Ceph块存储(RBD)精讲
linux·运维·笔记·ceph·云计算·rbd
代码N年归来仍是新手村成员1 天前
【AWS】Lambda 初识与服务部署
javascript·react.js·ai·node.js·云计算·ai编程·aws
小哈里1 天前
【K8S】云原生时代的GitOps最佳实践 —— ArgoCD
云原生·kubernetes·云计算·argocd·基础设施
wanhengidc1 天前
云手机 跨设备无缝衔接
运维·服务器·人工智能·智能手机·云计算
爱笑的源码基地1 天前
智慧班牌源码:从后端SpringBoot到前端Vue2的全栈实现
java·大数据·云计算·源码·程序代码·智慧校园源码·智慧班牌源码