'How to add Auto Scaling to an EMR cluster with Step Functions

I'm new to Step Function and I recently was asked to enable Auto Scaling for an specific EMR cluster, and I need to add that to the definition.

How am I supposed to add this configuration to the definitions file ?

          "Name": "master",
          "InstanceFleetType": "MASTER",
          "TargetOnDemandCapacity": 1,
          "InstanceTypeConfigs": [
            {
              "InstanceType": "r5.4xlarge",
              "EbsConfiguration":
                {
                  "EbsOptimized": true,
                  "EbsBlockDeviceConfigs": [
                    {
                      "VolumeSpecification" : 
                        {
                          "VolumeType": "gp2", 
                          "SizeInGB": 256
                        }
                      }
                   ]
                 }
             }
          ] 
        }

This cluster also has:

              {
          "Name": "CoreFleet",
          "InstanceFleetType": "CORE",
          "TargetOnDemandCapacity": 8,
          "InstanceTypeConfigs": [
              {
                "InstanceType": "r5.4xlarge"
              }
            ]
        }
      ]
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source