[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

相关推荐
Leweslyh2 分钟前
云计算:基础、概念与未来展望
学习·云计算·基础知识
AWS官方合作商31 分钟前
从技术视角看海外服务器免备案机制——以AWS云为例
云计算·aws
Captaincc5 小时前
AWS MCP Servers:开源套件,将 AWS 最佳实践无缝融入开发流程
aws·mcp
专注_每天进步一点点1 天前
QEMU-KVM加SPICE,云电脑诞生了
云计算·电脑
久违の欢喜1 天前
云计算:数字化转型的核心引擎
云计算
久违の欢喜1 天前
云计算:数字化转型的核心驱动力
云计算
AWS官方合作商1 天前
AWS云服务:大数据公司实现技术突破与商业价值的核心引擎
大数据·云计算·aws
阿里云云原生1 天前
南京大学与阿里云联合启动人工智能人才培养合作计划,已将通义灵码引入软件学院课程体系
人工智能·阿里云·云计算
{⌐■_■}1 天前
【Kubernetes】Kubernetes 在云平台(AWS EKS、GCP GKE、Azure AKS)的使用有何不同
kubernetes·azure·aws
zkmall1 天前
ZKmall开源商城多云高可用架构方案:AWS/Azure/阿里云全栈实践
架构·开源·aws