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"
        }
      }
    },
preguntada hace 2 años445 visualizaciones
1 Respuesta
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.

INGENIERO DE SOPORTE
respondido hace 2 años
profile picture
EXPERTO
revisado hace 15 días

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas