How to to call custom scripts ( powershelll , python, boto3 scripts etc ) for AWS resources in service now

jaganathant
Kilo Explorer

I have custom scripts for AWS resources like boto3 ,Lambda scripts , powershell and python scripts). How to call thise scripts in service now on the AWS cloud module.

Please help on the above.

3 REPLIES 3

Joe McCarty1
ServiceNow Employee
ServiceNow Employee

There is a vm_extension_point table which contains extension scripts for the various virtualization provider.   I think you need to identify the post provision script for your provider (EC2PostProvision for AWS) and add your logic their.   You should be able to launch an orchestrated workflow that runs Powershell or SSH activities depending on your needs.



http://wiki.servicenow.com/index.php?title=Cloud_Provisioning_Extension_Points#gsc.tab=0


Hi Joe,



I am looking for the option on the service catalog , currently I can run cloud formation JSON scripts only from service catalog.



Is it possible to any other scripts from service catalog ?


Yes it is possible as the service catalog request creates a requested item and launches a workflow.   The Cloud provisioning catalog workflows have a number of extension points.   But it is not configured on the CloudFormation Item or in the CloudFormation Template, if that's what you mean by Service Catalog.



Based on your description you want to look at the post provisioning extension point (though for Cloud Formation you probably want CloudFormationPostProvision).



From within that script you can launch another orchestrated workflow using the Workflow API(http://wiki.servicenow.com/index.php?title=Workflow_Script#gsc.tab=0) that can use the stock Powershell (Create a Powershell activity) and SSH (Create an SSH activity) workflow activity types to run the scripts.



It will require ServiceNow scripting knowledge (JavaScript + SN API) and Orchestration knowledge (Orchestration).