I am deploying an ArcGIS Server system to AWS using CloudFormation and part of the system includes an EC2 instance with ArcGIS Pro installed. My organization has an account assigned for that ArcGIS Pro installation to use. I can connect to the EC2 instance, log in to ArcPro and run a bunch of Python scripts that access arcpy functionality no problem.
What I am wondering is whether it is possible to script that login (maybe through some REST requests to ArcGIS Online somehow?) because I'd like to add it directly to the CloudFormation process, rather than needing to remember to log in later when the process is complete (or, if I'm not around, not needing to tell someone else the password).
Even better, is there a way I can do the equivalent of "Authorize ArcGIS Pro to work offline" to the EC2 host programmatically?
I've looked around but haven't found any suggestions of others trying to the same. If you're aware of some posts or documentation to this effect, I would greatly appreciate it.