EC2 Start Instance

Overview

The "EC2 Start Instance" action allows you to start a stopped Amazon EC2 instance (hereafter "EC2 instance"). Like other actions, you can specify EC2 instance by resource ID or the tag attached to EC2 instance.

Setting option

Region

  • Select the AWS region from the list where the EC2 instance you want to start is located.

 

How to specify EC2 instance

Instance
  • Select the EC2 instance you want to start by resource ID from the list.

    When "Can't find any instances in this region or aws account" is showing in the list, please verify whether AWS account and AWS region are correctly selected.
Instance with specific tag
  • Specify the EC2 instance tag you want to start by entering key and value.
  • All EC2 instances in the specified region that have a tag that matches the entered key and value will be the target.

 

Verify completion status of the resource

When you are checking the completion status of the resource
  • When the Startinstances API request is successful and the status of the started EC2 instance is running, the job is determined to have succeeded (note that this is not a status check).
  • When the Startinstances API request is successful and the status of the launched EC2 instance is other than running (stopped, etc.), it is determined that the job has failed.
When you don't check the completion status of the resource

Setting example

Create a job with the EC2 Start Instance action using Cloud Automator.

  1. Click the "Make Job" button on the operation job screen of Cloud Automator
  2. Select the group which the job to be associated with
  3. In the trigger selection, select intended trigger (Example: immediate execution trigger)
  4. Select "EC2 Start Instance" action in the action selection
  5. Under AWS account Selection, select designated AWS account
  6. Configure the action parameters

    Region ap-northeast-1
    Instances tagged with key: Environment value: Develop
    Watch resource exit status Check
    en.png
  7. Set post-processing on success or failure
  8. Enter the job name and click "Confirm"

Operation check

  1. Click the log button for the created job.
  2. Click the details of the execution log from the execution log list.
  3. Check the results in the log details. If it shows "Success", you can confirm that the job is executed and succeeded. When the status is "Running", that means the job is still running so wait for a little while and check again.
  4. The operation result of each resource can be confirmed in the "AWS resource operation results".

Log status conditions

When checking the completion status of a resource

Condition for success
  • When the Startinstances API request is successful and the status of the launched EC2 instance is running
Condition for failure
  • When the EC2 instance specified in the job does not exist
  • When the number of EC2 instances specified in the job exceeds 200
  • When the Startinstances API request fails, or when the status of the launched EC2 instance becomes something other than running (such as stopped)

 

The job operation using the "EC2 Start Instance" action has been confirmed. Please use this feature for your benefit.

 

When not checking the completion status of the resource

Condition for success
  • When Startinstances API request successful.
Condition for failure
  • When the EC2 instance specified in the job does not exist.
  • When the number of EC2 instances specified in the job exceeds 200.
  • When the Startinstances API request fails.

 

The condition of the status at the resource operation history

When checking the end status of the resource

Condition for Completed
  • When the Startinstances API request is successful and the status of the launched EC2 instance is running.
Condition for Failed
  • When the Startinstances API request fails, or when the status of the launched EC2 instance becomes something other than running (such as stopped).

 

When not checking the end status of the resource

Condition for Completed
  • When Startinstances API request successful.
Condition for Failed
  • When the Startinstances API request fails.

AWS API to be used in this action

The following AWS APIs were used for execution of the action. Please note that the AWS account under which you run the action must have an IAM policy, which enables to run these APIs, attached.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request