Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/
Introduction
This Universal Task allows users to start, stop, terminate, and manage AWS EC2 instances on demand, simply by providing one or more instance IDs as input.
Overview
This task uses python boto3 to interact with the AWS platform using the credentials supplied within the task.
It supports multiple EC2 instances at once.
In Universal Controller this task goes to the success state until the EC2 instance is completely spun up or terminated.
Scheduling this task using Universal Controller workflow spins up and tears down EC2 instances based on the business needs, complete with correct set up and dependencies.
It dynamically manages EC2 operations, offering the potential to reduce EC2 operations costs in the cloud.
Software Requirements
This integration requires an Universal Agent and a Python runtime to execute the Universal Task against AWS EC2 Instance.
Software Requirements for Universal Template and Universal Task
Requires Python 2.7 or Python 3.6 or higher. Tested with the Universal Agent bundled Python distribution.
Python modules required:
requests
Boto3
Software Requirements for Universal Agent
Universal Agent for Windows x64 Version 6.6.0.0 and later with python options installed
Universal Agent for Linux Version 6.6.0.0 and later with python options installed
Software Requirements for Universal Controller
Universal Controller Version 6.7.0.0 and later
Software Requirements for the Application to be Scheduled
The Server Running the Universal Agent needs to have Python 2.7.x or 3.6.x installed
AWS programmatic Credentials -Access Key, Secret Access key and Region
This Universal Task for the AWS EC2-start-stop-terminate has been tested with the agent bundled with python 3.6 and boto3 module
Technical Considerations
Consider using this Universal Task either with universal agent bundled with python(uapy) and also having boto3 module within this environment or a python environment (py) in a host where Universal Agent is installed with boto3 module in it.
AWS IAM credentials (Access Key, Secret Access key and Region) should be with the appropriate access for handling AWS EC2 instances
Start, Stop, Terminate, and Manage AWS EC2 Instance Key Features
Feature | Description |
Start EC2 Instance | Start one or Multiple EC2 instance |
Stop EC2 Instance | Stops one or Multiple EC2 instance |
Terminate EC2 Instance | Terminate one or Multiple EC2 instance |
EC2 status | Provides one or Multiple EC2 instance status |
Import Start, Stop, Terminate, and Manage AWS EC2 Downloadable Universal Template
To use this downloadable Universal Template, you first must perform the following steps:
This Universal Task requires the /wiki/spaces/UC71x/pages/5178443 feature. Check that the/wiki/spaces/UC71x/pages/5177877 system property has been set to true.
Copy or Transfer the Universal Template file to a directory that can be accessed by the Universal Controller Tomcat user.
In the Universal Controller UI, select Configuration > Universal Templates to display the current list of Universal Templates.
Right-click any column header on the list to display an Action menu.
Select Import from the menu, enter the directory containing the Universal Template file(s) that you want to import, and click OK.
When the files have been imported successfully, the Universal Template will appear on the list.
Configure Start, Stop, Terminate, and Manage AWS EC2 Instance Universal Task
For the new Universal Task type, create a new task, and enter the task-specific details that were created in the Universal Template.
Field Descriptions for Start, Stop, Terminate, and Manage AWS EC2 Instance Universal Task
Field | Description |
AWS-DEFAULT-REGION | AWS Region kept as credential |
AWS-SECRET-ACCESS-KEY | AWS Secret Key |
AWS-ACCESS-KEY-ID | AWS Access Key |
EC2 Instance Function | Select either start or stop or terminate or check ec2 instance |
Instance ID’s | Provide the Instance ID which you would need to start or stop or term |
Examples for Start, Stop, Terminate, and Manage AWS EC2 Instance Universal Tasks
Start EC2 Instances
Document References
This document references the following documents:
Name | Location | Description |
---|---|---|
Universal Templates | https://docs.stonebranch.com/confluence/display/UC72x/Universal+Templates | User documentation for creating Universal Templates in the Universal Controller user interface. |
Universal Tasks | https://docs.stonebranch.com/confluence/display/UC72x/Universal+Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |