Skip to main content

AWS EventBridge ExecModule

Overview

AwsEventBridgeModule brings governed event routing into ValkyrAI workflows. It covers the highest-value Amazon EventBridge event-bus surface: bounded custom-event publication, event-bus and rule discovery, rule creation and deletion, target attachment and removal, and event-pattern testing. It uses the native map ABI, annotation-backed Workflow Studio discovery, and a verified IntegrationAccount rather than accepting credentials in workflow input.

The connector implements ten operations:

  • put_events submits one to ten custom events in one provider request.
  • list_event_buses, list_rules, and list_targets provide bounded opaque-token pagination.
  • describe_rule returns one normalized rule without echoing unbounded provider data.
  • put_rule creates or replaces a rule with an event pattern, schedule, or both.
  • delete_rule permanently deletes a rule after explicit confirmation.
  • put_targets adds or updates up to five rule targets.
  • remove_targets removes selected targets after explicit confirmation.
  • test_event_pattern evaluates a JSON event against a JSON pattern without changing routing state.

This capability complements n8n's event-driven AWS workflow model and ValkyrAI's AWS Lambda, SNS, and SQS connectors. It adds a native EventBridge control surface with stricter account binding, payload bounds, operation-specific fields, replay boundaries, destructive confirmations, and redacted output.

Usage

  1. Choose the AWS account, region, event bus, rules, and targets the workflow is allowed to use.
  2. Create a least-privilege IAM principal restricted to only those EventBridge 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 AwsEventBridgeModule to the workflow and bind that account through ExecModuleConfig.authConfig.integrationAccount.
  5. Choose one operation and supply only that operation's documented fields. Unexpected fields fail before provider access.
  6. Put approval and exact-resource reconciliation around event publishing and every rule or target mutation.

Never place AWS access keys or session tokens in module input. Credential-shaped fields are rejected before any EventBridge request.

Inputs

NameTypeRequired forDefaultConstraints
operationstringEvery executionNoneOne of the ten documented operations.
regionstringEvery executionNoneAWS region such as us-west-2; custom endpoints are not accepted.
eventBusNamestringOptional bus-scoped operationsdefaultEvent-bus name or ARN, at most 1,600 characters.
namePrefixstringOptional bus/rule list filterNoneBounded EventBridge name characters.
ruleNamestringRule and target operationsNone1-64 letters, digits, dots, underscores, or hyphens.
descriptionstringOptional put_rule fieldNoneAt most 512 characters; no control characters.
eventPatternobject or JSON stringtest_event_pattern; optional put_ruleNoneMust normalize to a JSON object and remain within 4,096 UTF-8 bytes.
eventobject or JSON stringtest_event_patternNoneMust normalize to a JSON object within 256 KiB.
scheduleExpressionstringOptional put_rule fieldNoneBounded rate(...) or cron(...) expression.
statestringOptional put_rule fieldenabledenabled or disabled.
roleArnstringOptional put_rule fieldNoneValid bounded IAM role ARN.
entriesarrayput_eventsNoneOne to ten event objects.
targetsarrayput_targetsNoneOne to five unique target objects.
targetIdsarrayremove_targetsNoneOne to five unique target IDs.
paginationTokenstringOptional list fieldNoneOpaque provider token, at most 4,096 characters.
limitintegerOptional list field100From 1 through 1,000 total returned items.
returnAllbooleanOptional list fieldfalseFollow provider pages until limit or exhaustion.
forcebooleanOptional delete/remove fieldfalsePasses the provider force flag for managed resources.
confirmDeletebooleandelete_rulefalseMust be exactly true.
confirmRemovebooleanremove_targetsfalseMust be exactly true.

Each entries item accepts:

FieldRequiredConstraints
sourceYes1-256 EventBridge source characters.
detailTypeYesNon-blank, at most 128 characters.
detailYesJSON value, serialized and bounded within the 256 KiB entry envelope.
resourcesNoAt most ten bounded resource references.
timeNoISO-8601 instant such as 2026-09-06T08:00:00Z.
traceHeaderNoBounded AWS trace header.

Each targets item accepts unique id, required arn, optional roleArn, and either constant JSON input or a dot-notation inputPath such as $.detail. Constant input and input path are mutually exclusive. The connector intentionally omits service-specific target parameter trees; use a narrower reviewed extension when ECS, Batch, Kinesis, SQS message-group, Redshift, SageMaker, or API Gateway parameters are required.

Outputs

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

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation.
attemptsintegerAlwaysProvider calls including pages and retry-safe reads.
resultTypestringSuccessevents, event_buses, rules, rule, targets, or event_pattern.
itemsarrayList successBounded normalized buses, rules, or targets.
countintegerList successReturned item count.
hasMorebooleanList successWhether EventBridge returned another page token.
paginationTokenstringAnother page existsOpaque provider continuation token.
dataobjectNon-list successNormalized acceptance, rule, target, or match result.
requestIdstringAWS supplies oneBounded provider reference for reconciliation.
errorobjectFailureSafe {code, message, httpStatus?, retryable} details.

put_events, put_targets, and remove_targets can return provider-level partial failures. Their result reports requested or accepted counts, failedEntryCount, partialFailure, and bounded entry identifiers/error codes. Event detail, target constant input, and provider error messages are never copied into output.

IntegrationAccount Requirements

Bind one AWS IntegrationAccount through the normalized ExecModule authentication relationship:

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

Grant only the actions enabled for the workflow:

  • Event publication and validation: events:PutEvents and events:TestEventPattern.
  • Discovery: events:ListEventBuses, events:ListRules, events:DescribeRule, and events:ListTargetsByRule.
  • Rule lifecycle: events:PutRule and events:DeleteRule.
  • Target lifecycle: events:PutTargets and events:RemoveTargets.
  • IAM: iam:PassRole only for the specific role ARNs a rule or target must assume.

Restrict resources to exact event buses and rules wherever the AWS action supports resource-level permissions. The current connector supports a long-lived access-key pair. Temporary session credentials, STS role assumption, workload identity, custom endpoints, and multi-account credential chaining are deferred.

Configuration

The awsAccount relationship is the only credential configuration. Region, bus, operation, and routing fields belong in mapped input or module parameters.

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:aws-eventbridge-production"
},
"payloadConfig": {
"parameters": "{\"operation\":\"put_events\",\"region\":\"us-west-2\",\"eventBusName\":\"business-events\"}"
}
}

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

Operations

OperationProvider behaviorSide effect and retry behavior
put_eventsSubmits one batch of up to ten events.External side effect, one provider attempt, no automatic replay.
list_event_busesLists bounded event-bus metadata.Read-only; each page retries transient failures up to three attempts.
list_rulesLists bounded rules for the selected bus.Read-only; bounded pagination and retry.
describe_ruleReads one exact rule.Read-only; bounded retry.
put_ruleCreates or replaces the named rule definition.Single attempt; omitted fields can clear prior provider state. Reconcile by exact name before replay.
delete_rulePermanently deletes one rule after confirmation.Destructive, single attempt; targets normally must be removed first.
list_targetsLists bounded targets for one rule.Read-only; bounded pagination and retry.
put_targetsAdds or replaces up to five selected targets.Single attempt; partial provider failures are surfaced.
remove_targetsRemoves selected targets after confirmation.Destructive, single attempt; partial provider failures are surfaced.
test_event_patternTests one JSON event against one pattern.Read-only; bounded retry.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing/malformed region, JSON, bus, rule, event, target, pagination value, confirmation, or unexpected operation field.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_EVENTBRIDGE_HTTP_400Invalid event pattern, target, schedule, resource state, managed rule, or provider quota.Usually noInspect the exact operation and resource state before changing input.
AWS_EVENTBRIDGE_HTTP_403IAM denies the action, bus, rule, target, or iam:PassRole.NoGrant only the missing permission under the intended conditions.
AWS_EVENTBRIDGE_HTTP_404Referenced bus, rule, or target no longer exists.NoReconcile the exact resource before creating or stopping.
AWS_EVENTBRIDGE_HTTP_429 / 500 / 503Throttle, concurrent modification, or transient provider pressure.Reads retry; writes report ambiguityInspect provider state and request evidence before any replay.
NETWORK_ERRORDNS, TLS, timeout, or connectivity failure.Reads retry; writes report ambiguityTreat publication or mutation acceptance as unknown until reconciled.
EXECUTION_ERRORUnexpected bounded runtime failure.No automatic replayPreserve operation and request evidence for investigation.

Provider exception text is never copied into workflow output, preventing event contents, target input, credentials, or unbounded provider payloads from leaking through errors.

Example

Publish an approved order event to a custom bus:

{
"operation": "put_events",
"region": "us-west-2",
"eventBusName": "business-events",
"entries": [
{
"source": "com.valkyrlabs.orders",
"detailType": "OrderApproved",
"detail": {
"orderId": "A-1042",
"approved": true,
"riskTier": "reviewed"
},
"resources": [
"arn:aws:orders:us-west-2:123456789012:order/A-1042"
],
"time": "2026-09-06T08:00:00Z"
}
]
}

Expected result shape:

{
"status": "success",
"operation": "put_events",
"attempts": 1,
"resultType": "events",
"data": {
"acceptedCount": 1,
"failedEntryCount": 0,
"partialFailure": false,
"entries": [
{"index": 0, "eventId": "provider-event-id"}
]
},
"requestId": "aws-request-reference"
}

The receipt means EventBridge accepted the event entry; it does not prove that a rule matched it or that every downstream target completed. Correlate target-specific telemetry and dead-letter delivery outside this connector.

Notes

  • Pagination: bus, rule, and target lists return one page unless returnAll=true; the connector follows opaque tokens with unchanged filters and stops at limit.
  • Rate limits: quotas vary by region, account, action, and target. Read calls use at most three attempts with short bounded backoff. Publications and mutations never retry automatically.
  • API limits: the connector caps event batches at ten, targets at five, list output at 1,000, event entries at 256 KiB, rule patterns at 4,096 bytes, and constant target input at 8,192 bytes.
  • Idempotency: discovery and pattern tests are replay-safe. put_events, put_rule, delete_rule, put_targets, and remove_targets can have side effects and are single-attempt.
  • Partial failure: EventBridge may accept some event or target entries while rejecting others. Inspect per-entry identifiers/error codes and reconcile accepted resources before submitting a narrowed recovery request.
  • Rule replacement: put_rule replaces omitted provider fields with null rather than preserving the previous definition. Read the current rule and submit the complete intended state.
  • Eventual consistency: new or changed rules and targets can require a short propagation period before matching or invocation reflects the update.
  • Managed rules: AWS-managed rules reject ordinary changes; force is exposed only for explicitly confirmed cleanup operations.
  • Destructive behavior: delete_rule and remove_targets require explicit confirmation. Deleting a rule normally requires target removal first.
  • Target delivery: target invocation, retry, age limits, IAM role assumption, dead-letter queues, and downstream success are separate from API acceptance.
  • Security: event detail and target input can contain confidential data. The connector does not echo them, and workflows must retain ACL-scoped output and logs.
  • Deferred operations: event-bus create/update/delete, archives/replays, schema registry, partner event sources, API destinations, connections, permissions, tags, global endpoints, pipes, scheduler resources, input transformers, dead-letter/retry configuration, and service-specific target parameter trees are not implemented.
  • Provider verification boundary: deterministic tests cover validation, JSON normalization, pagination, rule/target operation families, retry boundaries, destructive confirmations, credential/provider-error redaction, registration, and metadata. Live EventBridge behavior remains unverified until an authorized AWS account and reviewed non-production bus/rules/targets are supplied.
  • Functional reference: n8n demonstrates broad AWS workflow composition through service nodes and generic authenticated requests. ValkyrAI adds a native EventBridge module focused on the event-bus API, with stronger account, scope, output, replay, and deletion controls.
  • Runtime boundary: merged source and published documentation do not update the deployed Workflow Studio catalog until a ValkyrAI backend release exposes AwsEventBridgeModule through /v1/modules/metadata.