Internal Error on CloudFormation + Batch JobDefinition + Tags

0

Whenever I try to update tags on an AWS::Batch::JobDefinition, the template deployment fails with "Internal Error". Without changing tags, no problem, with tags, internal error, whatever the tag name or value are.

I'm using the latest AWS CLI

Here is such a template:

MyJobDefinition:
    Type: AWS::Batch::JobDefinition
    Properties:
      Type: "container"
      Parameters: {}
      RetryStrategy:
        Attempts: 2
      PropagateTags: true
      Tags:
        Version: "3.1.1"
      ContainerProperties:
        Command:
          - "python3"
          - "worker.py"
        JobRoleArn:
          Fn::ImportValue: !Sub "${IAMStackName}-EcsTaskExecutionRole"
        Image:
          Fn::Join:
            - ":"
            - - Fn::ImportValue: !Sub "${BaseStackName}-WorkerRepositoryUri"
              - !Ref DockerImageTag
        ResourceRequirements:
          -
            Type: VCPU
            Value: 16
          -
            Type: MEMORY
            Value: 16384

Steps to reproduce:

"JobDefinition" : {
      "Type" : "AWS::Batch::JobDefinition",
      "Properties" : {
        "Type" : "container",
        "ContainerProperties" : {
          "Image" : { 
	    "Fn::Join": [ "", [ "137112412989.dkr.ecr.", { "Ref" : "AWS::Region" }, ".amazonaws.com/amazonlinux:latest" ]] 
	  },
          "Vcpus" : 2,
          "Memory" : 2000,
          "Command" : [ "echo", "Hello world" ]
        },
        "RetryStrategy" : {
          "Attempts" : 1
        },
        "Tags": {
          "svat-version": "3.1.1"
        }
      }
    },
已提問 2 年前檢視次數 444 次
1 個回答
0

Hello,

Just to confirm, I have followed the above given steps in my local environment in us-east-1 region and I can confirm I haven't received any failure. I was successfully able to update the stack and new Job Definition with new Tags was provisioned.

As it is mentioned in the document, Tags property is a Replacement Update of resource so in my local environment new Job definition was created.

If you are still observing this issue, I would suggest to confirm the behavior in other AWS regions. Hopefully it is not specific to any region.

Good luck.

支援工程師
已回答 2 年前
profile picture
專家
已審閱 15 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南