[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

相关推荐
云老大-阿里云国际站代理商1 小时前
网站遇到恶意爬虫和CC攻击,阿里云国际站WAF与Bot管理怎么搭配
爬虫·阿里云·云计算
着迷不白3 小时前
生产环境标准的Linux系统安装到服务器
linux·云计算
Geek-Chow1 天前
01 · Why AWS Lambda: Idle Cost, Capacity Planning and Risky In-Place Deploys
云计算
workflower1 天前
超算中心聚焦高性能计算场景(HPC)
大数据·网络·人工智能·机器人·云计算·汽车
workflower2 天前
Agentic AI 时代的企业ICT 基础设施运维
运维·人工智能·机器学习·重构·云计算·汽车
Geek-Chow2 天前
00 · AWS Lambda 心智模型学习指南:总览、思维导图与阅读路线(专栏目录)
云计算
Geek-Chow2 天前
07 · AWS Lambda 自测题与动手实验:用 AWS CLI 验证版本、别名、预置并发与冷启动
云计算
yyuuuzz2 天前
云服务器部署 web 项目的进程常驻记录
运维·服务器·前端·阿里云·云计算·aws
略懂而已3 天前
腾讯云COS 自动同步 for windows
windows·云计算·腾讯云