When we have Pega in AWS, how do we manage Agents running on different nodes in the scenario of autoscaling, how can we make sure which node should run as a batch node and which should not? my scenario is, I do not want to run Agents on all nodes but specific.
You can have a separate tier ( instance ) for agent schedule and when ever this type of instance auto scales, the same type of instance would be spun up with the same configuration. And the required agents can be configured through JVM arguments.
So you can segregate the nodes like user nodes ( web nodes ) , batch/search nodes ( utility nodes ) with different Cloudformation templates & other configurations.
Please find the below PDN article explaining , how to selectively enable/disable an agent using JVM arguments.