首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AWS步骤函数- Transform {AWS::AccountId}::StepFunctionsYamlTransform失败,没有错误消息

AWS步骤函数- Transform {AWS::AccountId}::StepFunctionsYamlTransform失败,没有错误消息
EN

Stack Overflow用户
提问于 2019-08-30 13:15:43
回答 1查看 400关注 0票数 0

我正在编写一个cloudformation模板,用于创建aws、step函数、statemachine。下面是模板中导致错误的部分

代码语言:javascript
复制
AWSTemplateFormatVersion: 2010-09-09
Transform:
- StepFunctionsYamlTransform

StepFunctionsStateMachine:
  Type: AWS::StepFunctions::StateMachine
  Properties:
    StateMachineName: MyStack
    RoleArn: !GetAtt StateMachineRole.Arn
    DefinitionStringYaml: !Sub
    - |
      Comment: My-Stack-workflow
      StartAt: LambdaToStart
      TimeoutSeconds: 43200
      States:
        LambdaToStart:
          Type: Task
          Resource: "${LambdaToStartArn}"
          Next: WaitToWriteInS3
        WaitToWriteInS3:
          Type: Wait
          Seconds: 5
          Next: Batch_Job_1
        Batch_Job_1:
          Type: Task
          Next: LambdaForTriggerEmrJob
          Resource: arn:aws:states:::batch:submitJob.sync
          Parameters:
            JobName: "${BatchJob1}"
            JobDefinition: "${BatchJob1DefinitionArn}"
            JobQueue: arn:aws:batch:${AWS::Region}:${AWS::AccountId}:job-queue/${QueueName}
        LambdaForTriggerEmrJob:
          Type: Task
          Resource: "${LambdaForEmrArn}"
          Next: WaitFoEmrState
        WaitFoEmrState:
          Type: Wait
          Seconds: 90
          Next: CheckEmrState
        CheckEmrState:
          Type: Task
          Resource: "${ClusterStateCheckArn}"
          InputPath: "$.input.cluster"  # Values coming from lambda
          ResultPath: "$.input.cluster"  # Values coming from lambda
          Retry: *LambdaRetryConfig
          Next: IsClusterRunning
        IsClusterRunning:
          Type: Choice
          Default: WaitFoEmrState
          Choices:
          - Variable: "$.input.cluster.state"
            StringEquals: FAILED
            Next: StateMachineFailure
          - Variable: "$.input.cluster.state" # Values coming from lambda
            StringEquals: SUCCEEDED
            Next: FinalBatchJob
        StateMachineFailure:
          Type: Fail
        FinalBatchJob:
          Type: Task
          Resource: arn:aws:states:::batch:submitJob.sync
          Parameters:
            JobName: "${FinalBatch}"
            JobDefinition: "${FinalBatchDefinitionArn}"
            JobQueue: arn:aws:batch:${AWS::Region}:${AWS::AccountId}:job-queue/${QueueName
          End: true
    - LambdaToStartArn: !GetAtt LambdaToStart.Arn
      LambdaForEmrArn: !GetAtt LambdaForEmr.Arn
      BatchJob1DefinitionArn: !Ref BatchJob1Definition
      FinalBatchDefinitionArn: !Ref FinalBatchDefinition
      BatchJob1: !Sub ${AWS::StackName}-batch-1
      FinalBatch: !Sub ${AWS::StackName}-final-batch
      ClusterStateCheckArn: !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:cluster-state

它返回以下错误

代码语言:javascript
复制
Failed to create the changeset: Waiter ChangeSetCreateComplete failed:
Waiter encountered a terminal failure state Status: FAILED. Reason: 
Transform {AWS::AccountId}::StepFunctionsYamlTransform failed without an 
error message.

有谁能帮助我们认识到这一问题的解决方案?我不能调试很多,因为没有错误消息,它就会失败。提亚

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-31 11:36:54

AWS cloudformation错误有时非常复杂,很难调试它们。但我发现了错误。这是第9行JobQueue: arn:aws:batch:${AWS::Region}:${AWS::AccountId}:job-queue/${QueueName,很容易看出我错过了}。所以这是语法错误

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57727488

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档