[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
  1. 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. C++11 thread_local

    2024-05-16 02:56:05       55 阅读
  2. Linux Shell:local关键字

    2024-05-16 02:56:05       38 阅读
  3. Local Cache(二)demo

    2024-05-16 02:56:05       20 阅读
  4. macos安装local模式spark

    2024-05-16 02:56:05       52 阅读
  5. linux rc.local不生效

    2024-05-16 02:56:05       36 阅读
  6. Local Cache(一)Cache介绍

    2024-05-16 02:56:05       23 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-16 02:56:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-16 02:56:05       101 阅读
  3. 在Django里面运行非项目文件

    2024-05-16 02:56:05       82 阅读
  4. Python语言-面向对象

    2024-05-16 02:56:05       91 阅读

热门阅读

  1. Helm安装集群整理

    2024-05-16 02:56:05       30 阅读
  2. golang encoding/json 使用基础

    2024-05-16 02:56:05       27 阅读
  3. RocketMQ:broker配置说明

    2024-05-16 02:56:05       27 阅读
  4. Kruskal算法刷题笔记

    2024-05-16 02:56:05       31 阅读
  5. Conda常用命令

    2024-05-16 02:56:05       35 阅读
  6. Redis如何实现持久化

    2024-05-16 02:56:05       33 阅读
  7. 【Go语言入门学习笔记】Part1.梦开始的地方

    2024-05-16 02:56:05       32 阅读
  8. day 27 第七章 回溯算法part03

    2024-05-16 02:56:05       35 阅读
  9. python strftime和strptime的不同分析

    2024-05-16 02:56:05       30 阅读