I am using Amazon Web Services to host a Selenium Hub and Selenium Nodes.
I launch the hub like this:
java -jar selenium-server-standalone-3.141.59.jar -role hub -port 4444;
And I launch the nodes like this:
java -jar -Dwebdriver.chrome.driver=chromedriver selenium-server-standalone-3.141.59.jar -role node -hub http://10.0.1.119:4444/grid/register
This gives me a configuration like this:

As you can see, this configuration for the node contains Firefox capability and MaxInstances is set to 5.
How can I change this so that Firefox is NOT allowed (but Chrome is) and change the MaxInstances to 2 without using a JSONconfiguration file. I am using UserData, so I am not able to use an external file, I can only script it.
How can I achieve this?
When launching nodes: