Skip to main content

AWS

Connects to Amazon Web Services by invoking the aws CLI as a subprocess. An agent can list and manage S3 objects, EC2 instances, Lambda functions, and tail CloudWatch Logs.

Add to an agent node's tools array with _node_type: "tool-aws". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
regionNoAWS region, set as AWS_DEFAULT_REGION and passed as --region on every CLI call. Defaults to us-east-1.
access_key_idNoAWS access key ID, set as AWS_ACCESS_KEY_ID in the CLI subprocess environment.
secret_access_keyNoAWS secret access key, set as AWS_SECRET_ACCESS_KEY in the CLI subprocess environment.
profileNoNamed AWS CLI profile, passed as --profile on every call.

Requires the aws CLI to be installed and available on the host running the workflow.

{
"name": "aws",
"_node_type": "tool-aws",
"access_key_id": "{{ secret.AWS_ACCESS_KEY_ID }}",
"secret_access_key": "{{ secret.AWS_SECRET_ACCESS_KEY }}",
"region": "us-east-1"
}

Tools

aws_s3_list

List objects in an S3 bucket with optional prefix filter.

Parameters

ParameterTypeRequiredDescription
bucketstringYesS3 bucket name
prefixstringNoKey prefix filter

Returns: The output of aws s3 ls --recursive --human-readable for the bucket/prefix.

aws_s3_get

Get object metadata and first 4KB of content from S3.

Parameters

ParameterTypeRequiredDescription
bucketstringYesS3 bucket
keystringYesObject key

Returns: JSON (pretty-printed) from aws s3api get-object-attributes with ObjectSize, StorageClass, and LastModified.

aws_s3_put

Upload text content as an S3 object.

Parameters

ParameterTypeRequiredDescription
bucketstringYesS3 bucket
keystringYesObject key
contentstringYesFile content to upload

Returns: The output of the aws s3 cp upload command.

aws_ec2_list

List EC2 instances with their IDs, types, states and public IPs.

Parameters

ParameterTypeRequiredDescription
statestringNoFilter by state: running, stopped, terminated (empty = all)

Returns: A table (text) of instance ID, type, state, public IP, and Name tag.

aws_ec2_control

Start or stop EC2 instances by instance ID.

Parameters

ParameterTypeRequiredDescription
instance_idsstringYesComma-separated instance IDs
actionstringYesstart or stop

Returns: The output of aws ec2 start-instances/stop-instances (pretty-printed JSON), or an error if action is not start or stop.

aws_lambda_invoke

Invoke an AWS Lambda function synchronously and return its response.

Parameters

ParameterTypeRequiredDescription
functionstringYesLambda function name or ARN
payloadstringNoJSON payload to send to the function

Returns: The aws lambda invoke command output followed by the function's response body (read from a temporary local file).

aws_lambda_list

List all Lambda functions in the account/region.

No parameters.

Returns: A table (text) of function name, runtime, memory, and timeout.

aws_cloudwatch_logs

Tail recent CloudWatch log events from a log group.

Parameters

ParameterTypeRequiredDescription
log_groupstringYesCloudWatch log group name
minutesnumberNoLook back N minutes (default 30)
filterstringNoFilter pattern

Returns: A table (text) of log event timestamps and messages from aws logs filter-log-events.

Next