AWS EC2: Create Instances
CUSTOMER GENERIC
- 1 Disclaimer
- 2 Introduction
- 3 Overview
- 4 Software Requirements
- 5 Technical Considerations
- 6 AWS Create EC2 Instance (with Universal Agent) Key Features
- 7 Import AWS Create EC2 Instance (with Universal Agent) Downloadable Universal Template
- 8 Configure AWS Create EC2 Instance (with Universal Agent) Universal Task
- 9 Field Descriptions for AWS Create EC2 Instance (with Universal Agent) Universal Task
- 10 Examples for AWS Create EC2 Instance (with Universal Agent) Universal Tasks
- 11 Document References
- 12 Changelog
Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use.
Introduction
This Universal Task allows customers to create an EC2 instance with parameters, either in task form, or by simply creating an EC2 instance from the existing AWS launch template. This task also offers the option to additionally install a Linux/UNIX Universal Agent in the newly provisioned EC2 Instance.
Overview
The task interacts with the AWS platform via a Python boto3 module.
All AWS credentials remain encrypted.
Customers can also install/configure a Linux Universal Agent for each EC2 instance, enabling the Universal Controller to instantly communicate with the newly created instance. (NOTE: only Linux Universal Agent is supported at the moment.)
This task also lets customers create multiple EC2 instances with the same configuration. New instances can also be tagged.
It allows customers to create a new keypair or use an existing one for the new EC2 instance.
This task also enables options for additional EBS volume and encryption, as well as detailed monitoring.
AWS EC2 Task High-Level Overview
Software Requirements
This integration requires a 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 3.8 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 7.4.0.0 and later with python options installed
Universal Agent for Linux Version 7.4.0.0 and later with python options installed
Software Requirements for Universal Controller
Universal Controller Version 7.4.0.0 and later
Software Requirements for the Application to be Scheduled
The Server Running the Universal Agent needs to have Python 3.8.x installed
AWS IAM Credentials -Access Key, Secret Access key and Region with EC2 set of permissions
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.
With the current version of this Universal Task, Universal Agent can be installed only in Linux EC2 Instance.
AWS Create EC2 Instance (with Universal Agent) Key Features
Feature | Description |
Create New EC2 Instance | Creates a EC2 Instance based on the parameters that are provided in the form |
Launch EC2 from template | Create a EC2 Instance based on a template in AWS |
Import AWS Create EC2 Instance (with Universal Agent) Downloadable Universal Template
To use this downloadable Universal Template, you first must perform the following steps:
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow the instructions here.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Configure AWS Create EC2 Instance (with Universal Agent) 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 AWS Create EC2 Instance (with Universal Agent) Universal Task
Field | Description |
Select AWS Authentication | Select an AWS authentication mechanism. |
AWS-DEFAULT-REGION | AWS Region kept as Credential. |
AWS-SECRET-ACCESS-KEY | AWS Secret Key. |
AWS-ACCESS-KEY-ID | AWS Access Key. |
Loglevel | Set the Log level of the Task (set to "info" by default). |
Launch Instance Option | Select either launch from template or create a new ec2 instance with the parameter supplied in the form. |
LaunchTemplateName | Mandatory if Launch Instance Option = "Launch from Template". |
AWS_IMAGE_ID | Provide the AWS machine ID. Mandatory if Launch Instance Option = "Create New Instance". |
Keypair option | PEM file creation choice. Select either "Existing keypair" or "New keypair". |
EC2-KEYPAIR-Path & Name | Provide Keypair file name and the path (do not give the extension) for new and for existing keypair. |
EC2 Instance Type | Provide ec2-instance type (like t2. Micro) if Launch Instance Option = “Create New Instance”. |
Minimum Count | Minimum number of instances that need to be created, if Launch Instance Option = “Create New Instance”. |
Max Count | Maximum number of instances that need to be created, if Launch Instance Option = “Create New Instance”. |
Associate Public IP | Select whether or not a public IP needs to be created when an instance is created. |
SubnetId | Provide subnetID where the instance to be associated within AWS. |
Availability Zone | Provide Availability Zone where the instance to be associated within AWS. |
Security Group ID | Provide security group ids. If providing multiple IDs, then separate by comma. |
Instance Tag name | EC2 Instance Tag Name. |
Associate IAM Instance Profile | Check the box if an IAM instance profile needs to be associated. |
IAM Profile Name | If applicable, provide the IAM Instance Profile Name. |
Device Name | Provide the device name; for example, "/dev/sda1". |
EBS Voume Size | Provide EBS Volume size. |
EBS Vol. Type | Select either standard, io1, gp2, sc1, or st1. |
EBS Vol. Encyption | Check if encryption is needed. |
EC2 Monitoring | Check this box if detailed monitoring is required. |
Install Universal Agent | Check this box if you need to install Universal Agent with this new EC2 instance created. |
Agent Download URL | Provide the path to download the Agent URL, if Install Universal Agent is selected. |
Universal Agent Install OS | Select the OS where Universal Agent needs to be installed. |
Agent OMS IP | Provide the OMS server IP for the Universal Agent to be connected to after installation, if Install Universal Agent is selected. |
Use Public IP for SSH | Select if you need to use the public or provide IP for SSH. |
SSH User ID | Provide the OS user ID that will be used to make the SSH connection. |
Examples for AWS Create EC2 Instance (with Universal Agent) Universal Tasks
New EC2 Instance Creation
Launch Instance with Launch from Template
Document References
This document references the following documents:
Name | Description |
|---|---|
User documentation for creating Universal Templates in the Universal Controller user interface. | |
User documentation for creating Universal Tasks in the Universal Controller user interface. |
Changelog
ut-cs-aws-create-ec2-instance-with-ua-1.2.0 (2025-10-27)
Enhancement
Added: support for attaching IAM roles when launching new instances.
ut-aws-create-ec2-instance-with-ua-1.1.3 (2022-04-11)
Fixes
Fixed: template.json fix
ut-aws-create-ec2-instance-with-ua-1.1.2 (2022-03-25)
Fixes
Fixed: template_icon.png fix