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 options

No. Option Description
1 Region Select the AWS region from the list where the EC2 instance you want to start is located
2 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 you want to start by entering key and value to use tags. All EC2 instances in the specified region that have a tag that matches the entered key and value will be the target.

3 Check resource state after job execution
  • When checking resource state after job execution
    • When also performing status checks
      • AWS instance status checks will determine the success or failure of the "EC2: Start Instance" action job execution
    • When not performing status checks
      • When the Startinstances API request is successful and the state of the started EC2 instance becomes running, the job is determined to have succeeded (please note that this is not a status check)
      • When the Startinstances API request is successful and the state of the started EC2 instance becomes something other than running (such as stopped), the job is determined to have failed

    ※For details, please see [EC2: Start Instance] What is Status Check

  • When not checking resource state after job execution

Setting example

Create a job using the "EC2: Start Instance" action in Cloud Automator.

  1. Click the "Add Job" button from the operation job screen of Cloud Automator
  2. Select the group to which the job belongs
  3. In the trigger selection, select any trigger
  4. Select "EC2: Start Instance" action in the action selection
  5. Select any AWS account in the AWS account selection
  6. Configure the action parameters

    No. Option Setting value example
    1 Region ap-northeast-1
    2 Instance with specific tag

    key: Environment

    value: Development

    3 Check resource state after job execution Check
    ec2_instance.png
  7. Configure post-processing for success and failure
  8. Enter the job name and click "Create"

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 has been executed and succeeded. If it shows "Running", the job is still executing, so please check again after a while.
  4. The operation result of each resource can be confirmed in the "Resource operation result" section

 

This completes the operation check of the job using the "EC2: Start Instance" action.
Please make use of this feature.

Log status conditions

Check resource state after job execution: Yes
Status check: Yes

  • Success conditions
    • When all of the following are satisfied:
      • Startinstances API request is successful
      • All started EC2 instances have running state
      • All started EC2 instances pass system status check and instance status check, and EC2 instances that support attached EBS status check also pass EBS status check
  • Failure conditions
    • When any of the following occurs:
      • Startinstances API request fails
      • Any of the started EC2 instances has a state other than running (such as stopped)
      • Any of the started EC2 instances fails system status check, instance status check, or EBS status check for EC2 instances that support EBS status check

 

Check resource state after job execution: Yes
Status check: No

  • Success conditions
    • When all of the following are satisfied:
      • Startinstances API request is successful
      • All started EC2 instances have running state
  • Failure conditions
    • When any of the following occurs:
      • Startinstances API request fails
      • Any of the started EC2 instances has a state other than running (such as stopped)

 

Check resource state after job execution: No

  • Success conditions
    • Startinstances API request is successful
  • Failure conditions
    • Startinstances API request fails

 

Resource operation history status conditions

Check resource state after job execution: Yes
Status check: Yes

  • Conditions for Completed
    • When all of the following are satisfied:
      • Startinstances API request is successful
      • All started EC2 instances have running state
      • All started EC2 instances pass system status check and instance status check, and EC2 instances that support attached EBS status check also pass EBS status check
  • Conditions for Failed
    • When any of the following occurs:
      • Startinstances API request fails
      • Any of the started EC2 instances has a state other than running (such as stopped)
      • Any of the started EC2 instances fails system status check, instance status check, or EBS status check for EC2 instances that support EBS status check

 

Check resource state after job execution: Yes
Status check: No

  • Conditions for Completed
    • When all of the following are satisfied:
      • Startinstances API request is successful
      • All started EC2 instances have running state
  • Conditions for Failed
    • When any of the following occurs:
      • Startinstances API request fails
      • Any of the started EC2 instances has a state other than running (such as stopped)

 

Check resource state after job execution: No

  • Conditions for Completed
    • Startinstances API request is successful
  • Conditions for Failed
    • Startinstances API request fails

AWS APIs used in this action

The following AWS APIs are used for the execution of this action.
The AWS account to be executed must have an IAM policy attached that allows execution of these APIs.

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