Overview
The "EC2: Stop Instance" action allows you to stop a running 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 stop is located
How to specify EC2 instance
Instance |
|
Instance with specific tag |
|
Verify completion status of the resource
When you are checking the completion status of the resource |
|
When you don't check the completion status of the resource |
|
Setting example
Create a job with the EC2: Stop Instance action using Cloud Automator.
- Click the "Make Job" button on the operation job screen of Cloud Automator
- Select the group which the job to be associated with
- In the trigger selection, select intended trigger (Example: immediate execution trigger)
- Select "EC2 Stop Instance" action in the action selection
- Under AWS account Selection, select designated AWS account
- Configure the action parameters
Region ap-northeast-1 Instances tagged with key: Environment value: Develop Watch resource exit status Check - Set post-processing on success or failure
- Enter the job name and click "Confirm"
Operation check
- Click the log button for the created job.
- Click the details of the execution log from the execution log list.
- 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.
- 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 |
|
Condition for failure |
|
When not checking the completion status of the resource
Condition for success |
|
Condition for failure |
|
The condition of the status at the resource operation history
When checking the end status of the resource
Condition for Completed |
|
Condition for Failed |
|
When not checking the end status of the resource
Condition for Completed |
|
Condition for Failed |
|
The job operation using the "EC2 Stop Instance" action has been confirmed. Please use this feature for your benefit.
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.
- EC2 API