preview
We're still working on this feature, but we'd love for you to try it out!
This feature is currently provided as part of a preview program pursuant to our pre-release policies.
This page provides a comprehensive reference for aws ec2 actions available in the workflow automation actions catalog. These actions enable you to ec2 instance and snapshot management.
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.
Launches the specified number of instances using an AMI for which you have permissions.
You can specify a number of options, or leave the default options. The following rules apply:
If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.
If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.
Input Field
Optionality
Type
Example
awsRoleArn
Optional
String
arn:aws:iam::123456789012:role/my-workflow-roleawsAccessKeyId
Optional
String
${{ :secrets:<awsAccessKeyId> }}awsSecretAccessKey
Optional
String
${{ :secrets:<awsSecretAccessKey> }}awsSessionToken
Optional
String
${{ :secrets:<awsSessionToken> }}region
Required
String
region: "us-east-2"imageId
Required
String
"ami-0ca4d5db4872d0c28"instanceType
Required
String
"t2.micro"minCount
Required
Int
1maxCount
Required
Int
10parameters
Optional
Map
{"EbsOptimized": false,"TagSpecifications": [{"ResourceType": "instance","Tags": [{"Key": "Name","Value": "My-Web-Server"}]}}selectors
Optional
List
[{\"name\": \"response\", \"expression\": \".response\"}, {\"name\": \"success\", \"expression\": \".success\"}, {\"name\": \"errorMessage\", \"expression\": \".errorMessage\"}]Important
To support a wide range of inputs, the
parametersmap accepts any optional argument available. This allows you to dynamically construct requests by adding multiple fields.Output Field
Type
Example
response
Object
Response syntax can be referred: run_instances - Boto3 1.40.50 documentation
success
Boolean
success: true | falseerrorMessage
String
errorMessage: ""Workflow example
name: ec2_run_instanceworkflowInputs:arnRole:type: Stringrequired: truesteps:- name: RunInstancetype: actionaction: aws.ec2.runInstancesversion: '1'inputs:awsRoleArn: ${{.workflowInputs.arnRole}}region: us-east-2imageId: ami-0ca4d5db4872d0c28instanceType: t2.microminCount: 1maxCount: 1parameters:EbsOptimized: falseTagSpecifications:- ResourceType: instanceTags:- Key: NameValue: My-Test-Instanceselectors:- name: instanceIdexpression: .response.Instances[0].InstanceId
Describes the specified instances or all instances.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
instanceIds | Optional | List |
|
filters | Optional | List |
|
nextToken | Optional | String |
|
maxResults | Optional | Int | 100 |
selectors | Optional | List |
|
Important
In action input at least one of the AWS credentials (short, long, role) should be provided, where role take precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | Response syntax can be referred describe_instances. |
success | Boolean |
|
errorMessage | String |
|
Important
- 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 do not specify instance IDs or filters, the output includes information for all instances.
- The parameter
instanceIdscannot be used withmaxResults.
Workflow Example |
|---|
|
Starts an Amazon EBS-backed instance that you previously stopped.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
instanceIds | Required | List |
|
selectors | Optional | List |
|
Conseil
In the action input, at least one of the AWS credentials (short, long, role) should be provided, where the role takes precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | Response syntax can be referred start_instances - Boto3 1.40.50 documentation |
success | Boolean |
|
errorMessage | String |
|
Workflow example |
|---|
|
Stops an Amazon EBS-backed instance
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
instanceIds | Required | List |
|
hibernate | Optional | Boolean | true or false (Default: |
force | Optional | Boolean | true or false (Default: |
selectors | Optional | List |
|
Important
In the action input, at least one of the AWS credentials (short, long, role) should be provided, where the role takes precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | Response syntax can be referred stop_instances |
success | Boolean |
|
errorMessage | String |
|
Workflow example |
|---|
|
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.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
instanceIds | Required | List |
|
selectors | Optional | List |
|
Important
In the action input, at least one of the AWS credentials (short, long, role) should be provided, where the role takes precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | |
success | Boolean |
|
errorMessage | String |
|
Workflow example |
|---|
|
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.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
instanceIds | Required | List |
|
selectors | Optional | List |
|
Important
In the action input, at least one of the AWS credentials (short, long, role) should be provided, where the role takes precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | Response syntax can be referred terminate_instances - Boto3 1.40.50 documentation |
success | Boolean |
|
errorMessage | String |
|
Workflow example |
|---|
|
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 save data before shutting down an instance.
The location of the source EBS volume determines where you can create the snapshot.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
description | Optional | String |
|
outpostArn | Optional | String |
|
volumeId | Required | String |
|
tagSpecifications | Optional | List |
|
location | Optional | String |
|
selectors | Optional | List |
|
Important
Input at least one of the AWS credentials (short, long, role) should be provided, where role take precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | Response syntax can be referred create_snapshot. |
success | Boolean |
|
errorMessage | String |
|
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.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
snapshotId | Required | String |
|
selectors | Optional | String |
|
Conseil
Input at least one of the AWS credentials (short, long, role) should be provided, where the role takes precedence over the others.
Output Field | Type | Example |
|---|---|---|
response | Object | No Response in case of Response syntax can be referred delete_snapshot - Boto3 1.40.55 documentation. |
success | Boolean |
|
errorMessage | String |
|
Workflow Example |
|---|
|
Invokes an AWS Bedrock agent.
Input Field | Optionality | Type | Example |
|---|---|---|---|
awsRoleArn | Optional | String |
|
awsAccessKeyId | Optional | String |
|
awsSecretAccessKey | Optional | String |
|
awsSessionToken | Optional | String |
|
region | Required | String |
|
agentId | Required | String |
|
agentAliasId | Required | String |
|
sessionId | Optional | String |
|
inputText | Required | String |
|
parameters | Optional | Map | |
selectors | Optional | List |
|
Output Field | Type | Example |
|---|---|---|
response | Object | |
success | Boolean |
|
errorMessage | String |
|
Workflow Example |
|---|
|