[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

相关推荐
lihuhelihu28 分钟前
第3章 CentOS系统管理
linux·运维·服务器·计算机网络·ubuntu·centos·云计算
dessler1 小时前
Linux系统-ubuntu系统安装
linux·运维·云计算
kongxx2 小时前
AWS S3在客户端应用不能使用aws-sdk场景下的文件上传与下载
aws
kongxx2 小时前
AWS S3 JavaScript SDK(v3)常用操作
aws
Elastic 中国社区官方博客3 小时前
如何将数据从 AWS S3 导入到 Elastic Cloud - 第 3 部分:Elastic S3 连接器
大数据·elasticsearch·搜索引擎·云计算·全文检索·可用性测试·aws
九河云3 小时前
如何选择适合的AWS EC2实例类型
服务器·云计算·aws
Huaqiwill5 小时前
Ubuntun搭建并行计算环境
linux·云计算
为什么这亚子7 小时前
九、Go语言快速入门之map
运维·开发语言·后端·算法·云原生·golang·云计算
划水小将军7 小时前
阿里云函数计算GBK编码
阿里云·云计算
沈艺强8 小时前
云计算答案
云计算