我正在尝试为 StepFunctions 创建 CloudFormation。 我想将
DefinitionString
作为参数传递。 json 字符串相当大。最大上限为 4096 字节。我该如何处理参数大于上限的情况。下面给出了示例模板
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "An example template for a Step Functions state machine.",
"Resources" : {
"MyStateMachine" : {
"Type" : "AWS::StepFunctions::StateMachine",
"Properties" : {
"StateMachineName" : "HelloWorld-StateMachine",
"DefinitionString" : "{\"StartAt\": \"HelloWorld\", \"States\": {\"HelloWorld\": {\"Type\": \"Task\", \"Resource\": \"arn:aws:lambda:us-east-1:111122223333:function:HelloFunction\", \"End\": true}}}",
"RoleArn" : "arn:aws:iam::111122223333:role/service-role/StatesExecutionRole-us-east-1"
}
}
}
}
如果其他人在 4069 字节最大值方面遇到困难,那么您可以将 Step Function 定义上传到 s3 存储桶并使用
DefinitionS3Location
参数。