AWS EC2 Connector 1.0.0.0
The AWS EC2 Connector lets you list, start, stop, and terminate EC2 instances. You can use its bulk Job Definitions to start, stop, and terminate multiple EC2 instances at one time.
Prerequisites
- RunMyJobs 9.2.9 or higher.
- Connection Management Extension 1.0.0.4 or later. This will be installed or updated automatically if necessary when you install the AWS EC2 Connector.
- AWS S3 Utilities 1.0.0.0 or later. This will be installed or updated automatically if necessary when you install the AWS EC2 Connector.
- An AWS Connection.
- Privileges Required to Use the AWS EC2 Connector.
Contents
Object Type | Name | Description |
---|---|---|
Folder | GLOBAL.Redwood.REDWOOD.AWS.REDWOOD.EC2 | Integration Connector with AWS EC2 (1.0.0.0) |
Constraint Definition | REDWOOD.Redwood_AWS_EC2_InstanceIdConstraint | Constraint for AWS EC2 instances in the specified region |
Constraint Definition | REDWOOD.Redwood_AWS_EC2_NotStoppedInstanceIdConstraint | List of instances in the specified region that are not in a Stopped state |
Job Definition | REDWOOD.Redwood_AWS_EC2_BulkStartInstance | Start EC2 Instances |
Job Definition | REDWOOD.Redwood_AWS_EC2_BulkStopInstance | Stop Multiple EC2 Instances |
Job Definition | REDWOOD.Redwood_AWS_EC2_BulkTerminateInstance | Terminate multiple EC2 Instances |
Job Definition | REDWOOD.Redwood_AWS_EC2_ListInstances | List AWS EC2 Instances |
Job Definition | REDWOOD.Redwood_AWS_EC2_StartInstance | Start an EC2 Instance |
Job Definition | REDWOOD.Redwood_AWS_EC2_StopInstance | Stop an EC2 Instance |
Job Definition | REDWOOD.Redwood_AWS_EC2_TerminateInstance | Terminate an EC2 Instance |
Job Definition Type | REDWOOD.Redwood_AWS_EC2 | AWS EC2 Definition Type |
Library | REDWOOD.Redwood_AWS_EC2 | Library for AWS EC2 Connector |
Setup
To install the AWS EC2 Connector, click its tile in the Catalog, select the version you want, and then click Install <version number>.
Job Definitions
Redwood_AWS_EC2_BulkStartInstance
Lets you start multiple EC2 Instances defined in an RTX file with one call.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | instances
|
Instances |
The EC2 Instances to start. The supplied table must contain the columns InstanceID and Region. |
Table | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Running state before completing. When set to No, the Start command will be issued, then the Redwood jJob will complete immediately without waiting for the instance to reach a Running state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Running state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Redwood_AWS_EC2_BulkStopInstance
Lets you stop multiple EC2 Instances defined in an RTX file with one call.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | instances
|
Instances | The EC2 Instances to stop. The supplied table must contain the columns InstanceID and Region. | Table | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Stopped state before completing. When set to No, the Stop command will be issued, then the Redwood Job will complete immediately without waiting for the instance to reach a Stopped state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Stopped state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Redwood_AWS_EC2_BulkTerminateInstance
Lets you terminate multiple EC2 Instances defined in an RTX file with one call.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | instances
|
Instances | The EC2 Instances to terminate. The supplied table must contain the columns InstanceID and Region. | Table | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Terminated state before completing. When set to No, the Terminate command will be issued, then the Redwood Job will complete immediately without waiting for the instance to reach a Terminated state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Terminated state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Redwood_AWS_EC2_ListInstances
Lists AWS EC2 instances.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction |
---|---|---|---|---|---|
Parameters | connection
|
Connection | The Connection object to use to connect to AWS EC2. | String | In |
Parameters | regionName
|
Region | The region to list instances from. | String | In |
Parameters | nameFilter
|
Instance Name Filter | Only include instances that have a name matching this filter. Wildcards * and ? are supported. | String | In |
Parameters | tagsFilter
|
Tags Filter |
Only include instances that contain a tag that matches this filter. Each entry should be in Example: |
String | In |
Parameters | filters
|
Additional Filters |
Only include instances that match all of these specified filters. Each entry should be in Example: |
String | In |
Parameters | listing
|
Definition Listing | Link to the generated RTX file containing the listing output. | Table | Out |
Redwood_AWS_EC2_StartInstance
Starts an EC2 instance.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | regionName
|
Region | The name of the Region that the instance is located in. | String | In |
|
|
Parameters | instanceId
|
Instance | The EC2 Instance to start. | String | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Running state before completing. When set to No, the Start command will be issued, then the Redwood Job will complete immediately without waiting for the instance to reach a Running state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Running state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Redwood_AWS_EC2_StopInstance
Stops an EC2 instance.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | regionName
|
Region | The name of the Region that the instance is located in. | String | In |
|
|
Parameters | instanceId
|
Instance | The EC2 Instance to stop. | String | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Stopped state before completing. When set to No, the Stop command will be issued, then the Redwood Job will complete immediately without waiting for the instance to reach a Stopped state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Stopped state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Redwood_AWS_EC2_TerminateInstance
Terminates an EC2 instance.
Parameters
Tab | Name | Description | Documentation | Data Type | Direction | Default Expression | Values |
---|---|---|---|---|---|---|---|
Parameters | connection
|
Connection | The name of the connection for EC2. | String | In |
|
|
Parameters | regionName
|
Region | The name of the Region that the instance is located in. | String | In |
|
|
Parameters | instanceId
|
Instance | The EC2 Instance to terminate. | String | In |
|
|
Parameters | waitForCompletion
|
Wait for Completion | When set to Yes, the Job will wait for the instance to reach a Terminated state before completing. When set to No, the Terminate command will be issued, then the Redwood Job will complete immediately without waiting for the instance to reach a Terminated state. | String | In | No
|
Yes , No |
Parameters | waitTimeout
|
Wait Timeout | The amount of time (in minutes) to wait for the instance to reach a Terminated state after the Job starts. If after this period of time the instance is still not in the desired state, the Redwood Job will fail. | Number | In | 5
|
|
Procedures
Listing AWS EC2 Instances
You can use the Redwood_AWS_EC2_ListInstances Job Definition to retrieve a list of EC2 instances. This Job Definition returns the list of instances in RTX format, so that you can use it in a Workflow Definition (see Starting, Stopping, or Terminating Multiple AWS EC2 Instances, below).
To list AWS EC2 instances:
-
In the AWS > EC2 Application, submit the Redwood_AWS_EC2_ListInstances Job Definition.
-
Choose an AWS Connection.
-
Choose the AWS Region the EC2 instances are in.
-
Optionally, to limit the results, enter one or more filter strings. You can filter by instance name, tags, and by additional filters.
-
Submit the Job Definition.
-
In the Monitor screen, select the process, then look at the Detail View. Under Files, the
listing.rtx
file contains the list of EC2 instances (if any).
The RTX file generated by this Job Definition lists the name, ID, region, instance state, instance type, availability zone, and launch time for each EC2 instance.
Starting, Stopping, or Terminating a Single AWS EC2 Instance
To start, stop, or terminate a single EC2 instance:
-
In the AWS > EC2 Application:
-
To start the EC2 instance, submit the Redwood_AWS_EC2_StartInstance Job Definition.
-
To stop the EC2 instance, submit the Redwood_AWS_EC2_StopInstance Job Definition.
-
To terminate the EC2 instance, submit the Redwood_AWS_EC2_TerminateInstance Job Definition.
-
-
Choose an AWS Connection.
-
Choose the AWS Region the EC2 instance is in.
-
Enter the instance ID for the EC2 instance in the Instance field.
-
To specify whether you want the Job Definition to wait for the EC2 instance to finish starting/stopping/terminating before completing, choose an option from the Wait for Completion dropdown list.
-
To specify how long (in minutes) to wait for the EC2 instance to reach a Running/Stopped/Terminated state after the Job starts, enter a number in the Wait Timeout field. If the instance does not reached the desired state before this period ends, the Job will fail.
-
Submit the Process Definition.
Starting, Stopping, or Terminating Multiple AWS EC2 Instances
You can use an RTX file containing InstanceID and Region columns to start, stop, or terminate multiple EC2 instances at one time.
For example, to start multiple EC2 instances using a listing.rtx
file retrieved with a Redwood_AWS_EC2_ListInstances call, you can create a Workflow where the first Step calls Redwood_AWS_EC2_ListInstances and the second Step calls Redwood_AWS_EC2_BulkStartInstance, and map the output of the first call's Definition Listing Out Parameter to the second call's Instances In Parameter.
The Wait for Completion and Wait Timeout fields work the same way they do for the other EC2 Job Definitions.
Note: If the RTX file does not contain both InstanceName and InstanceID columns, the Job will fail.