Skip to main content

AWS Systems Manager ExecModule

Overview

AwsSystemsManagerModule brings governed AWS Systems Manager operations into ValkyrAI workflows. It discovers managed nodes, dispatches and reconciles Run Command executions, reads and changes Parameter Store values, and starts or inspects Automation runbooks. The connector uses ValkyrAI's native map ABI and a verified IntegrationAccount; credentials never belong in workflow input.

The connector implements thirteen operations:

  • describe_managed_nodes inventories bounded EC2 and hybrid managed nodes.
  • list_commands, get_command_invocation, send_command, and cancel_command cover reviewable Run Command dispatch and reconciliation.
  • get_parameter, list_parameters, get_parameters_by_path, put_parameter, and delete_parameter cover Parameter Store discovery and lifecycle.
  • start_automation, get_automation, and stop_automation cover asynchronous runbook execution.

n8n's reusable AWS credential and region model provides the functional workflow reference. Its AWS credential supports SSM-compatible signing and composable AWS calls, while ValkyrAI adds a dedicated Systems Manager module with strict operation-specific fields, managed-node and hierarchy bounds, explicit mutation confirmations, confidential output classification, read-only retry, and deterministic provider-state reconciliation.

Usage

  1. Identify the exact region, managed nodes, documents, parameter paths, and Automation runbooks the workflow may access.
  2. Create a least-privilege IAM principal restricted to those SSM actions and resources.
  3. Store its access key ID and secret access key in an AWS IntegrationAccount; verify it and keep it in READY status.
  4. Add AwsSystemsManagerModule and bind the account through ExecModuleConfig.authConfig.integrationAccount.
  5. Use discovery operations before mutation: inventory nodes, inspect parameter metadata, and review the exact SSM document or runbook.
  6. Supply only fields accepted by the selected operation. Unexpected fields fail before provider access.
  7. Reconcile the returned command or Automation execution ID after a timeout; never blindly replay a mutation.

Never place an AWS access key, secret key, session token, or credentials object in module input. Those fields are rejected before any network request. Command text and output, Parameter Store values, KMS key references, runbook parameters, provider tokens, and Automation failure details are confidential and belong only in ACL-scoped workflow state.

Inputs

NameTypeRequired forDefaultConstraints
operationstringEvery executionNoneOne of the thirteen documented operations.
regionstringEvery executionNoneAWS region such as us-west-2; custom endpoints are not accepted.
nextTokenstringOptional list fieldNoneOpaque provider token, at most 4,096 characters.
limitintegerOptional list field100Total result bound from 1 through 10,000.
returnAllbooleanOptional list fieldfalseFollow pages until limit, exhaustion, or 100 pages.
commandIdstringInvocation/cancel; optional list filterNoneUUID returned by send_command.
instanceIdstringget_command_invocationNoneEC2 i-... or hybrid mi-... managed-node ID.
instanceIdsarraysend_command; optional cancel subsetNone1-50 unique EC2 or hybrid managed-node IDs.
pluginNamestringOptional invocation fieldNoneCommand plugin name, at most 128 characters.
documentNamestringCommand/Automation startNoneSSM document name or SSM document ARN whose region matches region.
documentVersionstringOptional command/Automation fieldNonePositive version, $DEFAULT, or $LATEST.
parametersobjectOptional command/Automation fieldEmptyUp to 50 names, each containing 1-50 strings of at most 4,096 characters.
commentstringOptional send_command fieldNoneSafe text up to 100 characters.
timeoutSecondsintegerOptional send_command field360030-2,592,000 seconds before an unstarted command expires.
maxConcurrencystringOptional command/Automation fieldProvider defaultPositive count or 1-100 percent.
maxErrorsstringOptional command/Automation fieldProvider defaultNon-negative count or 0-100 percent.
parameterNamestringSingle Parameter Store operationsNoneHierarchical name up to 1,011 characters; reserved aws/ssm prefixes are rejected.
parameterPathstringget_parameters_by_pathNoneHierarchy root under the same Parameter Store naming rules.
withDecryptionbooleanParameter readsfalseExplicitly decrypt SecureString values into confidential output.
recursivebooleanParameter path readsfalseTraverse all hierarchy levels below parameterPath.
parameterValuestringput_parameterNone1-8,192 characters; never echoed in receipts or errors.
parameterTypestringOptional put_parameter fieldSTRINGSTRING, STRING_LIST, or SECURE_STRING.
keyIdstringOptional secure write fieldNoneKMS key ID/alias/ARN; accepted only with SECURE_STRING.
overwritebooleanOptional put_parameter fieldfalseCreate a new version of an existing name.
tierstringOptional put_parameter fieldProvider defaultSTANDARD, ADVANCED, or INTELLIGENT_TIERING.
dataTypestringOptional put_parameter fieldProvider defaultBounded provider data type such as text or aws:ec2:image.
descriptionstringOptional put_parameter fieldNoneSafe text up to 1,024 characters.
allowedPatternstringOptional put_parameter fieldNoneProvider-side validation expression up to 1,024 characters.
automationExecutionIdstringAutomation read/stopNoneUUID returned by start_automation.
clientTokenstringstart_automationNoneUnique UUID idempotency token required before provider access.
automationModestringOptional start_automation fieldAUTOAUTO or INTERACTIVE.
stopTypestringOptional stop_automation fieldCANCELCOMPLETE or CANCEL.
confirmSendCommandbooleansend_commandfalseMust be exactly true.
confirmCancelCommandbooleancancel_commandfalseMust be exactly true.
confirmPutParameterbooleanput_parameterfalseMust be exactly true.
confirmDeleteParameterbooleandelete_parameterfalseMust be exactly true.
confirmStartAutomationbooleanstart_automationfalseMust be exactly true.
confirmStopAutomationbooleanstop_automationfalseMust be exactly true.

Outputs

Every call returns stable status, operation, and attempts fields.

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation.
attemptsintegerAlwaysProvider calls including pages and retry-safe reads.
resultTypestringSuccessManaged-node, command, parameter, or Automation result family.
itemsarrayList/path successBounded normalized records.
countintegerItems are presentNumber of returned items.
pagesintegerPaginated successProvider pages consumed.
hasMorebooleanPaginated successWhether AWS returned another token.
nextTokenstringAnother page existsOpaque continuation token.
dataobjectSuccessCommand, parameter, or Automation receipt.
requestIdstringAWS supplies oneBounded request reference for reconciliation.
errorobjectFailureSafe {code, message, httpStatus?, retryable} details.

Managed-node discovery returns platform, agent, resource, association, ping, and host summaries. Command dispatch returns an immutable command ID when AWS supplies one; invocation reads can include bounded standard output and standard error. Parameter reads include the value because retrieval is the purpose of the operation, so the entire output remains confidential. Automation reads return status, timestamps, current step, bounded failure detail, step count, and output keys without copying runbook output values.

IntegrationAccount Requirements

Bind one AWS IntegrationAccount through the normalized ExecModule authentication relationship:

FieldRequirement
ProviderAmazon Web Services / Systems Manager
statusMust be READY.
verifiedMust be true.
apiKey SecureFieldAWS access key ID.
password SecureFieldAWS secret access key.

Grant only the actions enabled for the workflow:

  • Inventory: ssm:DescribeInstanceInformation.
  • Run Command reads: ssm:ListCommands and ssm:GetCommandInvocation.
  • Run Command mutation: ssm:SendCommand and ssm:CancelCommand, scoped to approved documents and managed nodes with tag/resource conditions where supported.
  • Parameter reads: ssm:GetParameter, ssm:GetParametersByPath, and ssm:DescribeParameters; add kms:Decrypt only for exact approved KMS keys when withDecryption=true.
  • Parameter changes: ssm:PutParameter and ssm:DeleteParameter; add kms:Encrypt/kms:GenerateDataKey only for approved secure parameters.
  • Automation: ssm:StartAutomationExecution, ssm:GetAutomationExecution, and ssm:StopAutomationExecution; include narrowly scoped iam:PassRole only when a reviewed runbook requires it.

The connector currently supports a long-lived access-key pair. STS session credentials, role assumption, workload identity, custom endpoints, Session Manager interactive channels, Fleet Manager, Maintenance Windows, State Manager associations, Patch Manager, OpsCenter, Change Manager, Distributor, Inventory upload, resource data sync, and multi-account target locations are deferred.

Configuration

The awsAccount relationship is the only credential configuration. Operation, region, document, node, parameter, runbook, pagination, and safety fields belong in mapped input or module parameters.

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:aws-systems-manager-production"
},
"payloadConfig": {
"parameters": "{\"operation\":\"send_command\",\"region\":\"us-west-2\"}"
}
}

The relationship value is illustrative. Persisted workflows bind the generated IntegrationAccount relationship, never plaintext credentials.

Operations

OperationProvider behaviorSide effect and retry behavior
describe_managed_nodesLists bounded EC2 and hybrid managed-node summaries.Read-only; each page retries transient failures.
list_commandsLists bounded Run Command summaries, optionally for one command ID.Read-only; opaque pagination and bounded retry.
get_command_invocationReads one node/plugin invocation including bounded output.Read-only; bounded retry.
send_commandDispatches one reviewed SSM document to 1-50 explicit managed nodes.Confirmed external mutation; exactly one provider attempt.
cancel_commandRequests cancellation for a command or node subset.Confirmed mutation; exactly one provider attempt.
get_parameterReads one parameter, optionally decrypting SecureString.Read-only; bounded retry; output is confidential.
list_parametersLists metadata without parameter values.Read-only; opaque pagination and bounded retry.
get_parameters_by_pathReads bounded values below one hierarchy path.Read-only; opaque pagination and bounded retry.
put_parameterCreates or versions a parameter with optional KMS/tier/data-type controls.Confirmed mutation; exactly one provider attempt.
delete_parameterDeletes one parameter name.Destructive; confirmation and exactly one attempt.
start_automationStarts an SSM Automation runbook with a caller UUID token.Confirmed asynchronous mutation; exactly one attempt.
get_automationReads execution status, timestamps, current step, and output keys.Read-only; bounded retry.
stop_automationRequests CANCEL or COMPLETE for one execution.Confirmed mutation; exactly one attempt.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing/malformed region, ID, hierarchy, document, parameter map, pagination value, or confirmation.NoCorrect the named input; no provider request was sent.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_ERRORAccount missing, unverified, not READY, or missing key material.NoRepair and bind the AWS account.
AWS_SSM_HTTP_400Invalid document/parameter, target not online, unsupported state, duplicate token, or provider limit.Reads may retry selected transient codesInspect exact provider state and request ID.
AWS_SSM_HTTP_403IAM, KMS, document, managed-node, service-role, or resource condition denied.NoGrant only the missing action/resource/condition.
AWS_SSM_HTTP_404Command, invocation, parameter, document, node, or Automation execution no longer exists.NoReconcile the exact immutable identifier.
AWS_SSM_HTTP_429 / 500 / 503Throttle or transient provider pressure.Reads retry; mutations report ambiguityInspect command, parameter version, or execution before replay.
NETWORK_ERRORDNS, TLS, timeout, or connectivity failure.Reads retry; mutations report ambiguityTreat provider acceptance as unknown until exact state is checked.
EXECUTION_ERRORUnexpected bounded runtime failure.No automatic replayPreserve operation and request evidence for investigation.

Provider exception messages are never copied into workflow output. This prevents credentials, command text, parameter values, runbook inputs, KMS references, and provider details from leaking through errors.

Example

Dispatch a reviewed AWS-owned inventory document:

{
"operation": "send_command",
"region": "us-west-2",
"documentName": "AWS-GatherSoftwareInventory",
"instanceIds": ["i-0123456789abcdef0"],
"comment": "approved inventory refresh",
"timeoutSeconds": 900,
"maxConcurrency": "1",
"maxErrors": "0",
"confirmSendCommand": true
}

Expected result shape:

{
"status": "success",
"operation": "send_command",
"attempts": 1,
"resultType": "command_dispatch",
"data": {
"accepted": true,
"expectedStatus": "Pending",
"commandId": "12345678-1234-4234-9234-123456789012",
"status": "Pending",
"targetCount": 1
},
"requestId": "aws-request-reference"
}

The receipt proves only that AWS accepted the command. Poll get_command_invocation with the exact command and managed-node IDs until a terminal status, and treat command output as confidential.

Notes

  • Pagination: describe_managed_nodes, list_commands, list_parameters, and get_parameters_by_path return one page unless returnAll=true; the connector follows opaque tokens with unchanged inputs and stops at limit, exhaustion, or 100 pages.
  • Rate limits: Systems Manager quotas vary by account, region, action, managed-node fleet, and Automation concurrency. Read calls use at most five configured attempts with bounded backoff. Commands, parameter changes, and Automation mutations never retry automatically.
  • API limits: managed-node lists use provider pages of at most 50; parameter path pages at most 10; command targets at 50 explicit node IDs; document/runbook parameters at 50 names and 50 values per name; list results at 10,000; pages at 100; parameter values at 8,192 characters; and Run Command start timeout at 2,592,000 seconds. AWS can impose tighter operation-, tier-, or account-specific limits.
  • Idempotency: start_automation requires a caller UUID token. Run Command and Parameter Store operations do not become replay-safe merely because the input is stable. Reconcile command IDs, current parameter version/value policy, and Automation execution IDs before any retry.
  • Asynchronous behavior: Run Command and Automation continue after acceptance. Poll the corresponding read operation for terminal state; never interpret the acceptance response as completion.
  • Destructive behavior: delete_parameter can break applications immediately and removes the selected parameter name. send_command can execute arbitrary document-defined actions on nodes. stop_automation can leave partially applied changes. Scope IAM, require independent review, and prefer AWS-owned documents or version-pinned custom documents.
  • Secure values: withDecryption=true intentionally places decrypted values in confidential workflow output. Keep explicit ACLs, avoid logs, and prefer downstream bindings that do not serialize secrets. The connector never echoes parameterValue, command parameters, or runbook parameters in mutation receipts or error messages.
  • Document trust: a document name alone is not proof of safe behavior. Pin a reviewed version when practical, restrict document sharing and IAM, and inspect custom document ownership before execution.
  • Deferred operations: tag/target fan-out, command S3/CloudWatch output configuration, SNS notifications, Maintenance Windows, State Manager, Patch Manager, Session Manager channels, OpsCenter, Change Manager, Inventory upload, Distributor, multi-account Automation, and custom endpoints are intentionally not implemented.
  • Provider verification boundary: deterministic tests cover validation, operation families, pagination, retry boundaries, confirmations, credential/value redaction, error normalization, registration, and metadata. Live AWS behavior remains unverified until an authorized AWS account, reviewed managed node, document/runbook, and parameter namespace are supplied.
  • Functional reference: n8n's AWS credential model informs reusable credentials and regional workflow ergonomics. AWS Systems Manager API reference defines provider operations. ValkyrAI adds the review, confirmation, redaction, and retry boundaries described above.
  • Runtime boundary: merged source and published documentation do not update the deployed Workflow Studio catalog until a ValkyrAI backend release exposes AwsSystemsManagerModule through /v1/modules/metadata.