EC2 - Launch Instance(s)

Declaration

<AMAWSEC2 IMAGEID="text" INSTANCETYPE="text (options)" KEYPAIR="text" SECURITYGROUP="text" ZONE="text (options)" />

See Also

EC2 - Allocate Address, EC2 - Associate Address, EC2 - Attach Volume, EC2 - Authorize Security Group, EC2 - Create Key Pair, EC2 - Create Security Group, EC2 - Create Session, EC2 - Create Snapshot, EC2 - Create Volume, EC2 - Delete Key Pair, EC2 - Delete Security Group, EC2 - Delete Snapshot, EC2 - Delete Volume, EC2 - Disassociate Address, EC2 - End Session, EC2 - List Addresses, EC2 - List Images, EC2 - List Key Pairs, EC2 - List Running Instances, EC2 - List Security Groups, EC2 - List Snapshots, EC2 - List Volumes,  EC2 - Reboot Instance, EC2 - Release Address, EC2 - Revoke Security Group, EC2 - Start Instance, EC2 - Stop Instance, EC2 - Terminate Instance

Description

Launches a specified number of instances of an AMI (Amazon Machine Image) for which you have permissions.

An AMI is a special type of virtual appliance which is used to create a virtual machine within the Amazon Elastic Compute Cloud. It serves as the basic unit of deployment for services delivered using EC2.

NOTE: If EC2 cannot launch the minimum number AMIs you request, no instances will be launched. If there is insufficient capacity to launch the maximum number of AMIs you request, EC2 launches the minimum number specified for each AMI and allocate the remaining available instances using round robin.

 

IMPORTANT: The EC2 activities are performed using Amazon's EC2 engine. You must enter a valid Amazon EC2 service account in order for these activities to work properly.

Practical Usage

See Description.

Parameters

Instance Properties

Property

Type

Required

Default

Markup

Description

Image ID

Text (Options)

Yes

(Empty)

IMAGEID="ami-b232d0db"

The unique ID of a machine image. Use the List Images activity to gather a list of images. The available options are:

  • ami-b232d0db | Getting Started on Fedora Core 8

  • ami-22b0534b | Ruby on Rails Web Starter

  • ami-2cb05345 | LAMP Web Starter

  • ami-84db39ed | Basic Fedora Core 8

  • ami-69c32f00 | Getting Started on Microsoft Windows Server 2008

  • ami-45c22e2c | Basic Microsoft Windows Server 2008

  • ami-cdc22ea4 | Basic 64-bit Microsoft Windows Server 2008

  • ami-2bc32f42 | Microsoft SQLServer 2008 on Windows Server 2008

Instance Type

Text (Options)

Yes

(Empty)

INSTANCETYPE="m1.small"

The type of instance to launch. EC2 allows you to choose from a number of different instance types to meet your computing needs. Each instance provides a predictable amount of dedicated compute capacity and is charged per instance-hour consumed. The available options are:

  • m1.small | Small (32-bit)

  • c1.medium | High-CPU Medium (32-bit)

  • m1.large | Large (64-bit)

  • m1.xlarge | Extra Large (64-bit)

  • m2.xlarge | High-Memory Extra Large (64-bit)

  • m2.2xlarge | High-Memory Double Extra Large (64-bit)

  • m2.4xlarge | High-Memory Quadruple Extra Large (64-bit)

  • c1.xlarge | High-CPU Extra Large (64-bit)

Security Group

Text

Yes

(Empty)

SECURITYGROUP="LinuxGroup"

The name of the security group. A security group is a named collection of access rules that specify which incoming network traffic should be delivered to your instance. Use the Create Security Group activity to create a new

Keypair Name

Text

Yes

(Empty)

KEYPAIR="websvr-keypair"

The name of the key pair.

Availability Zone

Text (Options)

Yes

No Preference

ZONE="us-east-1a"

The zone in which to launch the instance(s). The available options are:

  • No Preference (default)

  • us-east-1a

  • us-east-1b

  • us-east-1c

  • us-east-1d

Number of Instance(s)

Number

Yes

1

TOTALINSTANCES="3"

The number of instances to launch.

NOTE: If Amazon EC2 cannot launch the specified number of instances, no instances will launch.

Kernel ID

Text

No

(Empty)

KERNELID="aki-ba3adfd3"

The ID of the kernel with which to launch the instance.

RAM Disk ID

Text

No

(Empty)

RAMDISKID="ari-abcdef01"

The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.

User Data

Text

No

(Empty)

USERDATA="user-data.txt"

Specifies Base64-encoded MIME user data to be made available to the instance(s) in this reservation.

Subnet ID

Text

No

(Empty)

 

SUBNETID="subnet-f3e6ab83"

Specifies the Amazon VPC subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

Enable cloud watch monitoring

Yes/No

No

No

MONITORING="yes"

If set to YES, enables monitoring for the instance.

Create and populate dataset with EC2 Instance information

Text

No

(Empty)

RESULTDATASET="datasetname"

The name of a dataset in which to create and populate information regarding the launched instances. More details regarding the fields that this dataset creates can be found below under Additional Notes.

Credentials Properties

These properties allow you to create a custom session for this activity or link this activity to an existing session.

Property

Type

Required

Default

Markup

Description

Provide Credentials

 

 

 

 

Indicates where this activity's credentials should originate from. Different properties apply depending on the option selected.

The available options are:

  • Custom (Default) - Specifies that a custom set of credentials will be entered for this EC2 activity. Select this option if performing a single EC2 activity.

  • Session Based - Specifies that credentials should derive from a session created in a previous step with the use of the Create Session activity. This allows several EC2 activities to be linked to a specific session.

Access Key

Text

Yes

(Empty)

ACCESSKEY="MyAccessKey"

A 20-character, alphanumeric string that uniquely identifies a user who owns a EC2 account (i.e. 022QF06E7MXBSH9DHM02). This along with a Secret Access Key forms a secure information set that EC2 uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

Secret Access Key

Text

Yes

(Empty)

SECRETKEY="SecretKey"

A 40-character string that serves the role as Password to access EC2 (i.e. kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct). This along with an associated Access Key forms a secure information set that EC2 uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

User Agent

Text

No

AutoMate

USERAGENT="AutoMate"

The User-Agent header name. The User-Agent request-header field contains information about the user agent originating the request such as timeouts, proxies, name, etc. The default User Agent name is AutoMate.

This property is active only if Custom is selected under the Provide Credentials property.

Service URL

Text

No

(Empty)

SERVICEURL=

"https://sdb.eu-west-1.amazonaws.com"

The Service URL used to make requests to the EC2 service. The Service URL provides the service endpoint. For example, To make the service call to a different region, you can pass the region-specific endpoint, such as 'https://sdb.eu-west-1.amazonaws.com'.

This property is active only if Custom is selected under the Provide Credentials property.

Maximum retry on error

Number

No

(Empty)

MAXERRORRETRY="4"

Signifies how many times the Amazon EC2 engine should retry the request before returning an error.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Host

Text

No

(Empty)

PROXYHOST="proxy.host.com"

The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Port

Number

No

(Empty)

PROXYPORT="1028"

The port that should be used to connect to the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Signature Method

Text

No

(Empty)

SIGNMETHOD="HmacSHA256"

The Signature Method for signing the request.

This property is active only if Custom is selected under the Provide Credentials property.

Signature Version

Number

No

(Empty)

SIGNVERSION="2"

The Signature Version for signing the request. The version refers to the particular algorithm for signing the request.

This property is active only if Custom is selected under the Provide Credentials property.

Session Name

Text

Yes

EC2Session

SESSION="EC2Session1"

The session name to be created. This allows several EC2 activities to be linked to this  session, eliminating redundancy. Numerous sessions can be used within a single task. The default value is EC2Session.

NOTE: Use the End Session activity to end an EC2 session.

This property is active only if Session Based is selected under the Provide Credentials property.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab allows you to select/omit specific errors that should cause a particular step to fail.

More on Error Causes properties

On Error Properties

The On Error tab allows you to determine what the task should do if a particular step encounters an error.

More about On Error properties

Additional Notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset assigned is named theDataset).

Name

Type

Return Value

theDataset.PublicIp

Text

Returns the public IP address assigned to your account (elastic IP address).

theDataset.InstanceId

Text

Returns the instance ID associated to the public IP address.

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Get list of Elastic IPs and store it into dataset "mydataset". Elastic IP is "67.202.55.255". Use default EC2 session.

 

<AMAWSEC2 IMAGEID="ami-b232d0db" INSTANCETYPE="m1.small" KEYPAIR="websvr-keypair" SECURITYGROUP="LinuxGroup" ZONE="No Preference" />

 

↑ Top of Page