Amazon EC2: Terminate Instance
Description
This step permanently terminates an EC2 instance on your AWS account. You provide the instance ID, and the step returns both the current and previous state. Once terminated, the instance and its data are deleted and cannot be recovered. Use this step in workflows that need to decommission servers, clean up temporary environments, or remove instances that are no longer needed.
Prerequisite
Login details to authenticate to Amazon AWS cloud. For details, see To create Access Key ID and Secret Access Key.
Configurations
| Field name | Description |
|---|---|
| Step Name | Specify a unique name for the step. |
| CONNECTION tab: | Connection fields |
| Region | Specify the region where the instance is hosted or choose a region from the Region Explorer window. The field type is String. This field is mandatory. |
| Button: Get | Click Get button to open the Region Explorer window. Choose a Region. |
| Access Key | Access key to authenticate Amazon AWS cloud. |
| Accept Values from fields | Leave checkbox unchecked to accept Access Key value from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Access Key field to appear as Text box. |
| Access Key | Specify the Access Key to authenticate Amazon AWS cloud EC2 instance. If checkbox above is enabled Access Key field appears as Text box and accepts static values or variables. Else if checkbox above is disabled Access Key field appears as a drop down to select fields from previous steps. The field type is String. This field is mandatory. |
| Secret Key | Secret key to authenticate Amazon AWS cloud. |
| Accept Values from fields | Leave checkbox unchecked to accept Secret Key value from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Secret Key field to appear as Text box. |
| Secret Key | Specify the Secret Key to authenticate Amazon AWS Cloud EC2 instance. If checkbox above is enabled Secret Key field appears as Text box and accepts static values or variables. Else if checkbox above is disabled Secret Key field appears as a drop down to select fields from previous steps. The field type is String. This field is mandatory. |
| Button: Test Connection | Click Test Connection button to verify whether the connection is available or not. Region, Access key and Secret Key are mandatory to authenticate Amazon AWS cloud. For the purpose of verification fields coming from previous steps are not allowed since field values can only be accessed when workflow is in running state. Static values and environment variables are allowed. |
| INPUT tab: | Input field |
| Instance Id | Specify the EC2 Instance Id to be terminated. |
| OUTPUT tab | Output fields |
| Current State | Specify an output field to hold the current state of the instance after successful plugin execution. Default value for this field is “CurrentState”. Current State label value is mandatory. |
| Previous State | Specify an output field to hold the previous state of the instance before successful plugin execution. Default label value for this field is “PreviousState”. Previous State label value is mandatory. |