Flow designer EC2 spoke actions to launch instance

Jinguo
Tera Contributor
 
3 REPLIES 3

Yashsvi
Kilo Sage

Hi @Jinguo,

To use Flow Designer's EC2 spoke actions to launch instances in ServiceNow, you'll need to set up an integration between ServiceNow and AWS (Amazon Web Services) using the AWS Cloud Management application. Here’s a general outline of the steps involved:

  1. Install and Configure AWS Cloud Management: Ensure the AWS Cloud Management application is installed and configured in your ServiceNow instance. This application provides the integration capabilities needed to manage AWS resources.

  2. Configure AWS Credentials: Set up AWS credentials within ServiceNow. These credentials will be used to authenticate and interact with your AWS account.

  3. Create an EC2 Spoke Action:

    • Navigate to Flow Designer in ServiceNow.
    • Create a new flow or edit an existing flow where you want to launch an EC2 instance.
    • Add an action using the EC2 spoke:
      • Select the AWS account credentials configured earlier.
      • Choose the action type, such as "Launch EC2 Instance".
      • Configure the details of the instance you want to launch, such as instance type, AMI (Amazon Machine Image), subnet, security groups, etc.
  4. Map Inputs and Outputs: Map the inputs required by the EC2 spoke action. These inputs typically include parameters like instance type, subnet ID, security group IDs, etc. Ensure these inputs are correctly mapped from your flow variables or user inputs.

  5. Handle Outputs and Error Handling: Configure how to handle outputs from the EC2 action (such as instance IDs) and implement error handling if the instance launch fails.

  6. Test and Deploy: Test your flow to ensure that launching instances works as expected. Once tested, deploy the flow to make it available for use in your ServiceNow instance.

  7. Monitor and Maintain: Monitor the flows for any issues and maintain the integration as necessary. AWS credentials and configurations may need periodic updates or review.

And please check below link:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0863182

 

Thank you, please make helpful if you accept the solution. 

Jinguo
Tera Contributor

Hi @Yashsvi ,

 

Thank you for the high level explanation. by working with both Amazon and Servicenow support, I am able to get the REST command syntax for modified version of run Instance spoke action working by supplying values for subnet id, keyname, and security group id. But when I plug this modified action in the flow designer, and tried to pass values from my catalog form, most of the fields are grayed out which means I cannot use them. I thought it was caused by the object type, so I made changes to be the same as in my catalog. But it still doesn't like it, Any idea?

Jinguo
Tera Contributor

Anyone had luck using the EC2 spoke actions in flow designer? I am having challenge to get some of them to work, such as Run Instance and List Image, neither of them work the way expected. For Run Instance it's expecting a default vpc which we don't have, by Amazon support in that case I need to supply subnet id, keypair and security group id. The OOB action is read only so I cannot add those additional input variables and I have to make a copy, but if I do that it would be out of support. So I am just here to ask if anyone have better experience using these actions.