This page provides a reference for AWS EC2 actions available in the workflow automation actions catalog. Use these actions to manage EC2 instances and EBS snapshots.
Prerequisites
Before using AWS actions in workflow automation, ensure you have:
- An AWS account with appropriate permissions.
- AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials).
- The necessary IAM permissions for the specific AWS services you plan to use.
See Set up AWS credentials for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.
Run instances
The action identifier is aws.ec2.runInstances.
Launches the specified number of instances using an AMI for which you have permissions. If you don't specify a subnet ID, the default VPC subnet is used. If any AMIs have a product code the user hasn't subscribed to, the request fails.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances will be launched. |
|
| String | Required. The ID of the AMI to use for the instance. |
|
| String | Required. The instance type to use for the instance. |
|
| Int | Required. Minimum number of instances to launch. |
|
| Int | Required. Maximum number of instances to launch. |
|
| Map | Optional. Additional boto3 API parameters for the run_instances call. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
Dica
The parameters map accepts any optional argument available in the boto3 API, allowing you to dynamically construct requests.
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the run_instances boto3 reference. |
| Boolean |
|
| String |
|
Describe an instance
The action identifier is aws.ec2.describeInstances.
Describes the specified instances or all instances.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances are located. |
|
| List | Optional. List of instance IDs to describe. |
|
| List | Optional. Filters to apply to the describe request. |
|
| String | Optional. Pagination token from a previous response. |
|
| Int | Optional. Maximum number of results to return. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the describe_instances boto3 reference. |
| Boolean |
|
| String |
|
Importante
If you specify instance IDs, the output includes information for only the specified instances. If you specify filters, the output includes information for only those instances that meet the filter criteria. If you specify neither, the output includes information for all instances. The instanceIds parameter cannot be used together with maxResults.
Restart instances
The action identifier is aws.ec2.startInstances.
Starts an Amazon EBS-backed instance that you previously stopped.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances are located. |
|
| List | Required. List of instance IDs to start. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the start_instances boto3 reference. |
| Boolean |
|
| String |
|
Stop instances
The action identifier is aws.ec2.stopInstances.
Stops an Amazon EBS-backed instance.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances are located. |
|
| List | Required. List of instance IDs to stop. |
|
| Boolean | Optional. Hibernate the instance instead of stopping it. Default: |
|
| Boolean | Optional. Force stop the instance. Default: |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the stop_instances boto3 reference. |
| Boolean |
|
| String |
|
Request an instance reboot
The action identifier is aws.ec2.rebootInstances.
Requests a reboot of the specified instances. This operation is asynchronous — it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored. If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances are located. |
|
| List | Required. List of instance IDs to reboot. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the reboot_instances boto3 reference. |
| Boolean |
|
| String |
|
Shut down instances
The action identifier is aws.ec2.terminateInstances.
Shuts down the specified instances. This operation is idempotent — if you terminate an instance more than once, each call succeeds. If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the instances are located. |
|
| List | Required. IDs of the instances to terminate. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the terminate_instances boto3 reference. |
| Boolean |
|
| String |
|
Create an EBS snapshot
The action identifier is aws.ec2.createSnapshot.
Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance. The location of the source EBS volume determines where you can create the snapshot.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the EBS volume is located. |
|
| String | Required. The ID of the EBS volume to snapshot. |
|
| String | Optional. A description for the snapshot. |
|
| String | Optional. The Amazon Resource Name (ARN) of the Outpost on which to create the snapshot. |
|
| List | Optional. Tags to apply to the snapshot at creation. |
|
| String | Optional. The location of the snapshot. Valid values: |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | See the create_snapshot boto3 reference. |
| Boolean |
|
| String |
|
Delete a snapshot
The action identifier is aws.ec2.deleteSnapshot.
Deletes the specified snapshot. You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI — you must first deregister the AMI before you can delete the snapshot.
The following table describes the input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
| String | Optional. IAM role ARN to assume for AWS API calls. |
|
| String | Optional. AWS access key ID. Pass as a secret. |
|
| String | Optional. AWS secret access key. Pass as a secret. |
|
| String | Optional. Temporary session token for STS authentication. Pass as a secret. |
|
| String | Required. AWS region where the snapshot is located. |
|
| String | Required. The ID of the snapshot to delete. |
|
| List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes the output fields for this action.
Output | Type | Example |
|---|---|---|
| Object | No response body on success. See the delete_snapshot boto3 reference. |
| Boolean |
|
| String |
|