【问题标题】:cloudformation template for watch rule for batch job批处理作业监视规则的 cloudformation 模板
【发布时间】:2020-09-24 20:05:36
【问题描述】:

是否可以为以下屏幕截图中设置的 cron 规则创建 cloudformation 模板?

我试图搜索一个我可以使用的示例。但我找不到。

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    基本模板将是(所有 ARN 必须更改为您的)AWS::Events::Rule

    Resources:
    
      MyCWEventRule:
        Type: AWS::Events::Rule
        Properties: 
          Name: my-batch-event-rule
          ScheduleExpression: cron(01 04 ? * * *)
          State: ENABLED
          Targets: 
            - Id: my-batch-job
              Arn: arn:aws:batch:us-east-1:xxxxx:job-queue/first-run-job-queue # <job-queue-arn>
              BatchParameters: 
                JobDefinition: arn:aws:batch:us-east-1:xxxx:job-definition/td-job:1
                JobName: tds-job
              RoleArn: arn:aws:iam::xxx:role/service-role/AWS_Events_Invoke_Batch_Job_Queue_1226795150      
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-16
      • 2022-08-18
      • 1970-01-01
      • 2019-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多