Amazon EC2 Connector

Automation Center is only available in the ISM Service Management edition. This feature is not available in the ISM Service Desk edition.

The Amazon EC2 connector helps you automate the management of Amazon EC2 instances. As a designer you can design workflows to provision, start, stop, terminate, and restart Amazon EC2 instances. This section provides following information for the Amazon EC2 connector:

Credentials

The Credentials section is a central repository that securely stores and manages all login credentials for the connector. You can add, edit, and validate credentials. For more information about how to add, edit, and validate credentials see connector credentials.

Follow these steps:

  1. From the Connector Library, click + for the connector to view its credentials.
  2. Click Edit for a credential to view and modify the parameters.
  3. You can delete, modify, validate, and save the credentials

Credential Parameter

Description

Default

Encrypted

Access Key ID

The Access Key ID identifies the user responsible for service requests.


Yes

Secret Access Key

The secret access key (a long string of characters)is used to sign programmatic requests to AWS.


Yes

Region Endpoint

The specific geographic area (region) in which AWS service request is being made.

ec2.us-east-1.amazonaws.com

No

Key Pair Name

The public and private keys to encrypt and decrypt the log in information.


No

Security Group IDs

The security group identifiers that are used to control the inbound and outbound traffic for your instances.


No

Operations

Input and Output Parameters

Create Instance

Input Parameters


NameDescriptionRequired?Type
AMI ID(M)Specify the String that specifies the identifier of the image (AMI) to use to launch the instance.TRUEString
Instance TypeInstance Type specifies the type of the instance to be launched. Default: t1.micro.TRUEString
Instance NameSpecify the user-defined instance name to be associated with the instance.TRUEString
Kernel IDSpecify the  ID of the kernel with which to launch the instance.FALSEString
RAM Disk IDSpecify the  ID of the RAM disk. Some kernels require more drivers at launch.FALSEString
Enable Basic MonitoringEnable Basic Monitoring indicates whether basic monitoring for the instance is enabled.FALSEBoolean
Client TokenSpecify the Unique, case-sensitive identifier that must be provided to AWS to ensure idempotency of the request. Specify the case-sensitive identifier that is passed when the request must be repeated.FALSEString
Instance Tag #1Specify the custom labeling assigned to categorize the instance; it must be specified as [name1]=[value1].FALSEString
Instance Tag #2Specify the custom labeling assigned to categorize the instance; it must be specified as [name2]=[value2].FALSEString
Instance Tag #3Specify the custom labeling assigned to categorize the instance; it must be specified as [name3]=[value3].FALSEString
Instance Tag #4Specify the custom labeling assigned to categorize the instance; it must be specified as [name4]=[value4].FALSEString
Instance Tag #5Specify the custom labeling assigned to categorize the instance; it must be specified as [name5]=[value5].FALSEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeResult Code specifies the result code. The Result code indicates the success or failure status of the operation.TRUEInteger
Result MessageSpecify the custom labeling assigned to categorize the instance; it must be specified as [name2]=[value2]. The verbose result message to indicate the status of the operation.TRUEString
Client TokenSpecify the Unique, case-sensitive identifier that is provided to AWS to ensure idempotency of the request.TRUEString
Reservation IDSpecify the Reservation identifier.TRUEString
Instance IdentifierSpecify the instance identifier for the instance.TRUEString
Owner IDSpecify the AWS account ID of the reservation owner.TRUEString
Public DNS NameSpecify the public DNS name that is associated with the instance.TRUEString
Public DNS IP AddressSpecify the public IP address.TRUEString
Instance StateSpecify the current state of the instance.TRUEString
Instance State CodeSpecify the system code that identifies the current state of the instance.TRUEInteger

Delete Instance 

Input Parameters


NameDescriptionRequired?Type
Instance IDThe Instance ID of the Amazon EC2  instance.TRUEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeSpecify the result code to indicate the success or failure status of the operation.TRUEInteger
Result MessageSpecify the verbose result message to indicate the status of the operation.FALSEString
Current Instance State CodeSpecify the internal system code that is associated with the current state of the instance.TRUEInteger
Current Instance StateSpecify the current state of the instance.TRUEString
Previous Instance State CodeSpecify the internal system code that is associated with the previous state of the instance.TRUEInteger
Previous Instance StateSpecify the previous state of the instance.TRUEString

Get Instance Status

Input Parameters


NameDescriptionRequired?Type
Instance IDThe Instance ID of the Amazon EC2 instance.TRUEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeResult Code specifies the result code. The Result code indicates the success or failure status of the operation.TRUEInteger
Result MessageSpecify the verbose result message. The verbose result message indicates the status of the operation.FALSEString
Current Instance State CodeSpecify the internal system code that is associated with the current state of the instance.TRUEInteger
Current Instance StateSpecify the current state of the instance.TRUEString

Start Instance

Input Parameters


NameDescriptionRequired?Type
Instance IDThe Instance ID of the Amazon EC2 instance.TRUEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeSpecify the result code to indicate the success or failure status of the operation.TRUEInteger
Result MessageSpecify the verbose result message to indicate the status of the operation.FALSEString
Current Instance State CodeSpecify the internal system code that is associated with the current state of the instance.TRUEInteger
Current Instance StateSpecify the current state of the instance.TRUEString
Previous Instance State CodeSpecify the internal system code that is associated with the previous state of the instance.TRUEInteger
Previous Instance StateSpecify the previous state of the instance.TRUEString

Stop Instance

Input Parameters


NameDescriptionRequired?Type
Instance IDSpecify the Instance ID of the Amazon EC2 instance.TRUEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeSpecify the result code to indicate the success or failure status of the operation.TRUEInteger
Result MessageSpecify the verbose result message to indicate the status of the operation.FALSEString
Current Instance State CodeSpecify the internal system code that is associated with the current state of the instance.TRUEInteger
Current Instance StateSpecify the current state of the instance.TRUEString
Previous Instance State CodeSpecify the internal system code that is associated with the previous state of the instance.TRUEInteger
Previous Instance StateSpecify the previous state of the instance.TRUEString

Restart Instance

Input Parameters


NameDescriptionRequired?Type
Instance IDSpecify the Instance ID of the Amazon EC2 instance.TRUEString
Output Parameters


NameDescriptionRequired?Type
Success(Boolean) Specifies whether the change request operation succeeded, where the value is either:TRUEBoolean
True - success.
False - failure.
Result CodeSpecify the result code to indicate the success or failure status of the operation.TRUEInteger
Result MessageSpecify the verbose result message to indicate the status of the operation.FALSEString
Current Instance State CodeSpecify the internal system code that is associated with the current state of the instance.TRUEInteger
Current Instance StateSpecify the current state of the instance.TRUEString

Associated Workflows

  1. Start an Instance
    You can use this workflow to start a user specified Amazon EC2 instance.
    For example, as an administrator you can raise a service request to start an amazon EC2 instance. The lifecycle of the Start an Instance workflow is as follows:
    • Start an Amazon Instance
    • Add worklog to Service Request 
    • Close service request (Intelligent Service Management connector)
    • Amazon EC2 Connector Task
    • Format Worklog Text
    • Add Worklog to Service Request 
    • Close Service RequestStop Amazon EC2 Instance
  2. You can use this workflow to stop an EC2 instance that is based on the user specified EC2 image identifier. For example, An EC2 instance is in the On state and you would like to turn it off. The lifecycle of Stop Amazon EC2 workflow is as follows:
    • Stop an Amazon Instance
    • Add worklog to Service Request 
    • Close service request 
    • Amazon EC2 Connector Task
    • Format Worklog Text
    • Add Worklog to Service Request 
    • Close Service Request 
  3. Provision an EC2 instance and create Asset record
    You can use this workflow to provision a new EC2 instance that is based on a predefined template. The template is based on an AMI ID and the type of the instance. For example, you want to you create an instance, Specify the AMI ID (amazon machine image id), base version of the image, the base OS and software. The lifecycle of the Provision an EC2 instance and create Asset record workflow is as follows:
    • Provision Amazon EC2 instance.
    • Create an Asset to represent provisioned EC2 instance
    • Relate Asset to Service Request 
    • Format Worklog Text
    • Delay Timer Task
    • Add Worklog to Service Request 
    • Close Service Request. Creates an asset record for the instance and communicates the details to the requester. (Intelligent Service Management connector)
  4. Terminate an Amazon EC2 Instance and update Service request
    This workflow can be used to terminate the provisioned AWS instance based on the instance identifier.
    For example, you have an Amazon EC2 instance that is running and you want to shut it down. Once you run this workflow, it deletes an asset you own from your repository. The instance is brought down, the disc space is cleared up, you will not own it anymore and you will not be charged for the instance. The lifecycle of the Terminate an Amazon EC2 Instance and update Service request workflow is as follows:
    • De-provision Amazon EC2 instance
    • Update asset to mark it as inactive
    • Relate Asset to Service Request
    • Format Worklog Text
    • Delay Timer Task
    • Add Worklog to Service
    • Close Service Request
  5. Restart an Amazon EC2 Instance
    You can use this workflow to restart a user specified EC2 instance.
    For example, you use a server on the cloud to do your tests and restart that instance. A dedicated administrator owns and processes requests for assets on the cloud. As a user you can raise a service request to execute this workflow to restart an Amazon EC2 instance. The lifecycle of the Restart an Amazon EC2 Instance workflow is as follows:
    • Restart Amazon EC2 Instance
    • Format Worklog Text
    • Add Worklog to Service Request
    • Close Service Request 

How to Configure an Amazon EC2 Automation Connector

© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com