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"
        }
      }
    },
demandé il y a 2 ans445 vues
1 réponse
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.

INGÉNIEUR EN ASSISTANCE TECHNIQUE
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a 15 jours

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions