[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

相关推荐
王道长服务器 | 亚马逊云23 分钟前
AWS CloudTrail:让每一次操作都“有迹可循”
服务器·网络·云计算·智能路由器·aws
不知道累,只知道类25 分钟前
Java 在AWS上使用SDK凭证获取顺序
java·aws
王道长AWS_服务器41 分钟前
AWS Elastic Load Balancing(ELB)—— 多站点负载均衡的正确打开方式
后端·程序员·aws
wanhengidc1 小时前
操作简单稳定选巨 椰 云手机
运维·服务器·游戏·智能手机·云计算
Apache Flink1 小时前
阿里云、Ververica、Confluent、Linkedin携手推进流式创新,共筑智能体AI未来
人工智能·阿里云·云计算
AWS官方合作商2 小时前
AWS WAF 深度体验:全新控制台,开启云原生WAF与CloudFront无缝联防新纪元
云原生·aws
wanhengidc7 小时前
云手机的魅力与优势
网络·游戏·智能手机·架构·云计算
TG_yunshuguoji9 小时前
启动模板创建AWS EC2 Auto Scaling指南
服务器·云计算·aws
王道长服务器 | 亚马逊云12 小时前
AWS CloudWatch:服务器的“眼睛”,实时监控一切动向
服务器·数据库·aws
郏国上12 小时前
图片上传阿里云
阿里云·node.js·云计算