This template creates an EMR Instance Group Config with the properties to specify an automatic scaling policy. It defines an AutoScalingPolicy with constraints, rules, and triggers for scale-out and scale-in. The scaling policy is based on CloudWatch alarms for YARN memory available percentage.

CloudFormation Template