I have a python script that creates a service draft, stage the service and uploads the service definition to a standalone ArcGIS Server. The script is executed as shell command from a node.js script in the same machine where ArcGIS Pro 2.4 is installed. The node.js is triggered by an AWS Lambda.
What baffles me is that I get a 999999 error at arcpy.StageService_server when the script is run from node.js in the Production environment. But strangely, it works in the UAT environment. It also works just fine if it is run from the command prompt in the Production environment. I get the same error even if I change the target server. I have tried on 10.7.1 and 10.6.1.
Both desktop and server machines are in the same VPC. The production machine is a clone of the UAT.
There is only 1 administrator account in the Desktop machine.
Could it be that the StageService require a write permission to a particular folder? Can someone provide insight into what the StageService is doing behind the scenes?
ArcGIS Pro 2.4
ArcGIS Server 10.7.1