* feat(eventbridge): create partner event buses from EventSourceName
CreateEventBus and AWS::Events::EventBus now accept EventSourceName. The
bus takes the source's name, so Name must equal it and must match
aws.partner/<partner>/<source>. Floci does not model partner event
sources, so any well-formed source name is accepted without one being
created or activated first.
A partner bus name contains slashes, so rule lookups for a bus no longer
match the rules of a bus nested under its name, and a rule ARN on a
partner bus resolves its bus and rule name from the last slash.
* test(eventbridge): cover partner event buses
Covers creating a partner bus from its EventSourceName, a name that
differs from the source or is not a partner name, rules, targets, tags
and PutEvents on the bus by name and by ARN, nested partner buses
keeping their rules apart, deletion, and the CloudFormation resource.
* refactor(eventbridge): resolve rule ARNs from the first slash again
ruleKey joins the bus and rule name with a slash, so splitting a rule
ARN at the first or the last slash finds the same stored rule. The
original split is kept, and the test that only exercised the changed
split goes with it; tagging a rule on a custom bus by ARN stays covered
by the existing tag tests.
* fix(eventbridge): validate rule names in PutRule
PutRule accepted any name, so a name holding a slash was stored under a
key that ListRules, PutEvents and DeleteEventBus no longer treat as a
rule of that bus, and could collide with a rule on a nested partner bus.
Rule names now match [\.\-_A-Za-z0-9]+ and are at most 64 characters,
as AWS models them, and a missing or out-of-pattern name fails with
ValidationException. The CloudFormation AWS::Events::Rule resource
creates its rule through the same PutRule path.
* fix(cloudformation): reject a Policy or malformed source on a partner event bus
An AWS::Events::EventBus with EventSourceName now checks the source name
against aws.partner/<partner>/<source> in the provisioner, so a
malformed one fails with ValidationError like the resource's other
checks rather than with the service's ValidationException. A Policy
given with EventSourceName is rejected with ValidationError before the
bus is created, since Floci never applies a resource policy to a bus
whose name holds a slash.
* fix(eventbridge): answer partner and rule name violations in AWS's shape
CreateEventBus with EventSourceName and PutRule now report a bad name
the way AWS's validation layer does, through SmithyValidationErrors:
"1 validation error detected: Value '...' at 'name' failed to satisfy
constraint: ...", naming the length, pattern or missing member that
failed. A partner bus with no Name now gets the required-member error
rather than a name mismatch. The partner source pattern is one public
constant on EventBridgeService, which the CloudFormation provisioner
now uses too.
* fix(eventbridge): refuse PutPermission and RemovePermission on a partner bus
Both operations model the bus as NonPartnerEventBusName, so AWS refuses
a partner bus there. Floci stored the policy, but never applied a
resource policy to a bus whose name holds a slash, so the statement had
no effect. They now fail with ValidationException in AWS's validation
shape, and an AWS::Events::EventBusPolicy on a partner bus fails the
stack the same way.
* fix(cloudformation): let an update change a partner bus's EventSourceName
Once a bus exists its Name is fixed, and a Name change is already
refused as a replacement, so EventSourceName carries nothing more on an
update. An UpdateStack that drops, adds or changes it while keeping
Name used to be validated as if it were creating the bus and failed;
it now updates the bus in place. Whether the bus is a partner bus is
read from its name, so a Policy on one is still refused when the
template stops naming its source.
* test(eventbridge): cover nested-bus PutEvents, partner rule tags and CFN rules
PutEvents on a partner bus does not fire the rules of a bus nested under
its name, a rule on a partner bus is tagged and listed by its ARN, and
an AWS::Events::Rule names a partner bus in EventBusName and goes with
the stack.
* docs(eventbridge): note partner bus permissions, PutEvents and the rule-name upgrade
* fix(cloudformation): validate a supplied EventSourceName on an event bus update
An update that keeps the bus's Name skipped EventSourceName entirely, so
a malformed source, one that does not match Name, or one newly added to
a custom bus was accepted. When the template supplies EventSourceName it
is now checked the way creation checks it; leaving it out still updates
the bus in place.
* fix(eventbridge): let a legacy slash-named rule block DeleteEventBus
DeleteEventBus only counted rules whose name held no slash, so a bus
whose only rule was a legacy slash-named one could be deleted, orphaning
the rule; a scheduled one kept firing after a restart. Every rule stored
under the bus now blocks the delete, except the rules of an existing
nested partner bus, which share the key prefix but belong to that bus.
* fix(eventbridge): validate rule names in the rule and target operations
Only PutRule checked the rule name, so DeleteRule, EnableRule,
DisableRule, PutTargets, RemoveTargets and ListTargetsByRule took a
name like a/b and looked it up by key, which on a partner bus could
reach a rule of a nested bus. They now answer a ValidationException the
way PutRule does. A legacy slash-named rule that is stored on the bus
named in the request is still reachable by its exact name, so it can
have its targets removed and be deleted.
* refactor(eventbridge): split a rule ARN at its last slash
A rule name holds no slash, so the bus is everything before the last
one. Splitting at the first slash found the same stored rule, since the
key joins bus and rule with a slash, but left RuleRef's bus and rule
wrong for a rule on a partner bus such as
rule/aws.partner/example.com/acct/r1.
* docs(eventbridge): describe legacy slash-named rules and EventSourceName updates
A legacy slash-named rule is hidden from ListRules and PutEvents but
still reachable by its exact name and blocks DeleteEventBus, and the
other rule operations now validate the name. On a CloudFormation update
a supplied EventSourceName is validated as on creation.
* fix(eventbridge): keep every persisted rule reachable by its exact name
PutRule did not validate rule names before, so a stored rule can be longer
than 64 characters or contain a space, colon or at sign. Skip name validation
whenever a rule with that exact name is stored on the requested bus, not only
for slashed names, so such a rule can still have its targets removed, be
disabled and be deleted, and no longer blocks DeleteEventBus forever.
* fix(eventbridge): name the rule member in target operation validation errors
PutTargets, RemoveTargets and ListTargetsByRule take the rule name in their
Rule member, so report a rejected name at 'rule' as AWS does instead of
at 'name'.
* fix(eventbridge): validate the rule name in DescribeRule
DescribeRule now applies the same rule name check as the other rule
operations, so a malformed name fails with ValidationException instead of
ResourceNotFoundException, while a persisted rule stays describable by its
exact name.
* fix(eventbridge): resolve a legacy slashed rule ARN on a custom bus
Splitting a rule ARN at its last slash finds rules on partner buses but
misses a rule persisted with a slash in its name on a custom bus, such as
rule/foo/team/r1. When no rule is stored for the last-slash split, fall back
to the first-slash split if the rule stored there belongs to that bus, so
TagResource, UntagResource and ListTagsForResource reach it again.
* refactor(eventbridge): decide DeleteEventBus by each rule's own bus
Count a stored rule against the bus being deleted when its eventBusName is
that bus, rather than inferring ownership from whether a nested bus exists
under the rule key's prefix.
* docs(cloudformation): note that AWS replaces a bus whose EventSourceName is dropped
* test(eventbridge): cover legacy slashed rules on a custom bus
Exercise the rule and target operations on a slash-named rule persisted on a
custom bus, and check that a slashed name stored for a different bus is still
rejected by every rule and target operation.
* refactor(eventbridge): split a rule ARN at its last slash only
A rule's store key joins the bus and rule name with a slash, so splitting
rule/foo/team/r1 at its first or last slash names the same stored rule. The
first-slash fallback could never find a rule the last-slash lookup missed;
drop it and resolve the ARN without a store lookup.
* test(eventbridge): pin the error a removed legacy slashed rule returns
Once the stored rule is gone, DescribeRule validates its slashed name again and
fails with ValidationException. Assert that code, and that the rule left the
store, instead of any AwsException.
* fix(cloudformation): treat a gone legacy-named rule as deleted
A stack created before rule names were validated can hold a rule whose name
PutRule now rejects. Once that rule is gone, ListTargetsByRule validates the
name and fails with ValidationException, so DeleteStack ended DELETE_FAILED.
Check whether the rule is stored first, through a new
EventBridgeService.ruleExists that skips name validation, and treat a missing
rule as already deleted.
* docs(eventbridge): spell out what a legacy slashed rule can still do
A slashed rule on the default bus can't be tagged by ARN, since rule/team/rule-1
reads as rule rule-1 on bus team; it stays reachable by exact name for the rule
and target operations only. A stack holding a legacy-named rule can still be
deleted, but an UpdateStack touching it fails because PutRule rejects the name.
* fix(eventbridge): report the length violation of a long partner bus name on permission calls
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* test(cloudformation): drop the section divider above the partner bus provisioner tests
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* docs(eventbridge): ground the partner bus permission rejection in the API model
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* fix(eventbridge): keep a partner bus off a legacy rule that shares its key
A rule key joins the bus and rule name with a slash, so a slash-named rule
persisted by an earlier version on a custom bus named aws.partner (for
example example.com/orders/r1) has the same key as rule r1 on partner bus
aws.partner/example.com/orders. Rule lookups, ListRules and PutEvents now
check the stored rule's bus, so the partner bus neither lists, fires nor
manages that rule, and PutRule on the partner bus is rejected rather than
taking over the legacy rule's tags and targets.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* test(eventbridge): keep Step Functions target rule names within the 64 character limit
PutRule now rejects rule names longer than 64 characters, as AWS does. The
Step Functions integration test built names from a 16 character prefix, the
suffix and a UUID, so the missing-target rule name reached 67 characters and
PutRule rejected it before the test ran. Use a shorter prefix.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* fix(eventbridge): check a permission call's bus name against the modeled 256 character limit
PutPermission and RemovePermission type EventBusName as NonPartnerEventBusName, which the model bounds at 1 to 256 characters with pattern [\.\-_A-Za-z0-9]+. The partner bus check used the 64 character rule name limit, so a partner bus name of 65 to 256 characters drew a length violation AWS does not report.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
---------
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* fix(eventbridge): validate scheduled rule rate expressions
Validate schedule expressions before PutRule creates or mutates a rule. Reject mismatched rate units with the AWS ValidationException while preserving existing rule state and timers. Keep stored-expression parsing tolerant.
Add service, SDK and scheduler regression coverage.
Closes#7996.
* refactor(eventbridge): share rate parsing and cover legacy stack updates
Use one matcher and parsed value/unit helper for strict API validation and tolerant stored-expression execution. Keep unit agreement checks at the API boundary.
Add a CloudFormation SDK regression proving that unrelated stack updates already skip unchanged legacy rules while direct PutRule calls remain strict. Correct the outdated test comment suggesting every resource is re-provisioned.
* refactor(eventbridge): share AWS rate validation with Scheduler
Move positive value, supported unit and singular/plural constraints into core.common.AwsRateExpressions. Both API validators call the shared checks while their execution parsers retain support for legacy stored expressions.
Parse Scheduler rates once per call and retain its checked interval conversion. Add cross-service tests for matching acceptance and rejection reasons.
Addresses review 5876298647 on #8113.
Add numeric comparisons to the shared matcher used by TestEventPattern and PutEvents. Validate all numeric filters before testing events or mutating rules, including nested patterns and every $or branch. Match numeric and literal filters against event array elements without splitting range bounds across different values.
Add service and AWS SDK success/error regressions.
Validation: 293 focused tests pass; zero Checkstyle violations.
Fixes#7695
The validator accepted arbitrary operator/number pairs, allowing repeated bounds, equality mixed with bounds, and unordered ranges. Restrict filters to a single comparison or a lower bound followed by a strictly greater upper bound.
Add SDK rejection and rule-preservation regressions and valid range boundary controls. All 386 focused tests, Checkstyle, docs-check, and partition-check pass.
Keep the new range boundary cases aligned with the surrounding parameter tables. This also requests fresh CI checks on the verified PR history.
Use one testing fixture for valid comparisons and invalid patterns in both the service and SDK suites. Preserve the union of existing cases, including nested and matching alternative branches, so both layers exercise the same matrix.
Validation: 402 focused EventBridge tests pass with no skips and zero Checkstyle violations.
Expose PipesFilterMatcher.matchesNumeric and use it from EventBridge instead of maintaining a second comparison loop. Retain the null and numeric-form guards.
Use AwsTestClients.create directly in the EventBridge SDK tests and remove the custom SDK client builder and injected endpoint.
Validation: all 463 EventBridge service, EventBridge SDK, and Pipes matcher tests pass, with no skips and zero Checkstyle violations.
CreateEventBus dropped KmsKeyIdentifier, DeadLetterConfig and LogConfig, which UpdateEventBus already stored, so a bus created with them read back without them. Store them on create and echo them in the response, as the model's CreateEventBusResponse does.
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.
Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.
Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.
Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
* fix(eventbridge): default and validate ECS target settings
Apply ECS target defaults when storing PutTargets and reject invalid task counts or malformed role and dead-letter ARN shapes before storing the batch. Add SDK read-back and wire-error regressions.
Closes#6188
* fix(eventbridge): validate target ARN components
Reject incomplete IAM role and SQS dead-letter ARN shapes before storing PutTargets batches. Preserve partition support and existing model length errors, with regression controls for all published partitions and IAM role paths.
* fix(core): share IAM role and SQS queue shape checks
Use shared resource-shape helpers from EventBridge, Step Functions, Lake Formation, AppSync, and S3 while preserving caller-specific errors and account/partition rules. Apply the existing SQS 80-character name limit to EventBridge dead-letter targets.
ListRules ignored Limit and NextToken and always returned every
matching rule. It now pages through the bus's rules in name order using
the shared Pagination cursor, keeping NamePrefix and EventBusName
filtering intact.
- Limit defaults to 100, the documented per-page maximum; an integral
value outside 1 to 100, including one wider than an int, is a
ValidationException.
- A string, boolean or fractional Limit is a SerializationException
rather than being coerced into a page size.
- NextToken is returned only when more rules remain.
- A token Floci did not mint is rejected with HTTP 400 InvalidToken, as
the API reference documents for a bad pagination token.
Fixes#6220
* fix(cloudformation): keep a rule target's dead-letter queue, retry policy, role and ECS parameters
EventsCfnProvisioner built each AWS::Events::Rule target from Id, Arn, the
inputs, HttpParameters, SqsParameters and BatchParameters only. A target's
DeadLetterConfig and RetryPolicy were dropped, so ListTargetsByRule showed
neither, delivery ran on the defaults (185 attempts over 24 hours) and an
event the target could not take was logged and lost instead of reaching the
queue the stack declared. RoleArn and EcsParameters, which PutTargets keeps,
were dropped as well.
Targets set through PutTargets already get the delivery semantics from
TargetDispatcher, so the provisioner now passes the four members through,
validated by putTargets as the API validates them. EcsParameters is converted
to the API's shape: the resource schema spells AwsVpcConfiguration,
PlacementStrategies, TagList and the placement and capacity provider items
differently from the EventBridge API, which spells them awsvpcConfiguration,
PlacementStrategy, Tags and in camel case; ListTargetsByRule on AWS returns
the converted shape (measured). RoleArn is stored, not used for delivery, as
Floci does not invoke targets under the role.
Targets is resolved once, with the engine's resolveNodeOmittingNoValue, so an
Fn::If choosing the whole list works, and a member, a list item or an Fn::If
branch that is AWS::NoValue is left out of the call while a literal "" stays.
An earlier version marked AWS::NoValue itself before resolving, with a
sentinel; the engine's rule does the same without one.
The four members are read against the types AWS::Events::Rule's resource
schema gives them, before the rule exists, with the messages measured on
CloudFormation (eu-west-1): template validation's "Property
[MaximumRetryAttempts] expected type: Integer, found: Float", and the
handler's "Model validation failed (#/Targets/0/EcsParameters/
EnableECSManagedTags: expected type: Boolean, found: String)" for what only
the handler refuses, which waits until every target has passed template
validation, as on AWS. What CloudFormation converts is converted the same
way: "4" is 4, "TRUE" is true, 5 in a list of strings is "5". Reading them
with convertValue alone truncated 4.5 to 4, ignored a RetryPolicy given as a
string and failed on "abc" with Jackson's message.
A list of strings (Subnets, SecurityGroups) takes every form that yields a
list on AWS, as Lambda's list properties do since #5923 and #5949: a Ref to a
CommaDelimitedList, Fn::Split and an Fn::If choosing either, also inside an
EcsParameters an Fn::If chooses; a Ref to a String is refused (measured).
That is why the reader walks the template as written, with the engine's
omitNoValue, now public, and resolves each call it meets, instead of
checking the resolved tree, where a CommaDelimitedList is already text.
The check is the new CfnPropertyTypes, which also takes over
LambdaCfnProvisioner's requireType and its list-of-strings reading, so
template validation has one implementation for both provisioners.
* test(cloudformation): read the rule's only target without List.getFirst
The SDK compatibility tests compile for Java 17, which has no
List.getFirst; the image build of sdk-test-java and ec2-containers failed
on it. A local JDK 25 with source 17 does not check the API, so the class
was compiled again with --release 17.
* test(compat): wait for a stack 50 ms at a time against Floci
Review of #5958: TestFixtures.awaitStackTerminal slept 500 ms between
checks, so each stack, which Floci finishes in milliseconds, cost at least
half a second. It now checks every 50 ms against Floci, as the integration
tests' CfnStackWaits does, and keeps 500 ms against real AWS. The rule
target test waits 10 seconds for a stack against Floci instead of 60, and
10 minutes against AWS, where the queues take minutes.
* feat(eventbridge): add ApiDestination target support (#4702)
- Add ApiDestination, ApiDestinationState, and HttpParameters models
- Implement CRUD operations for API destinations in EventBridgeService
- Add CreateApiDestination, DescribeApiDestination, UpdateApiDestination, DeleteApiDestination, ListApiDestinations actions in EventBridgeHandler
- Support HttpParameters on targets in PutTargets and ListTargetsByRule
- Implement HTTP delivery to API destinations in EventBridgeInvoker with connection auth and SSRF protection
- Add CloudFormation provisioning for AWS::Events::ApiDestination in EventsCfnProvisioner
- Update docs and tests
* fix(eventbridge): harden ApiDestination delivery and CloudFormation lifecycle
- Throw on delivery failure so TargetDispatcher retries 429/5xx and connection
errors and dead-letters permanent failures
- Enforce InvocationRateLimitPerSecond per destination
- Run the OAuth client-credentials exchange for OAUTH_CLIENT_CREDENTIALS connections
- Reject non-http(s) endpoints and wildcard hosts, encode path parameter values,
keep the query before any fragment, and stop logging URLs that may carry secrets
- Resolve destination and connection ARNs only when they match the stored ARN
- Validate every UpdateApiDestination field before applying any of them
- Paginate ListApiDestinations with Limit and NextToken
- Keep HttpParameters on AWS::Events::Rule targets and roll back
AWS::Events::ApiDestination updates from a snapshot
* fix(eventbridge): keep connection credentials authoritative and require a valid endpoint host
- Apply target headers and query parameters before the connection's so a target
cannot override its credentials, and replace header names that differ only by case
- Reject endpoints without a parsed host (for example https://:8080/path)
- Sweep stale rate-limit windows once the map grows
* fix(eventbridge): make the ApiDestination rate limit check atomic
Count permits inside ConcurrentHashMap.compute on an immutable window so the
stale-window sweep can no longer remove a window another delivery is using,
which let concurrent deliveries exceed InvocationRateLimitPerSecond.
* refactor(eventbridge): drop the in-service InMemoryStorage constructor and tidy tests
- Remove the compatibility constructor that instantiated InMemoryStorage inside
EventBridgeService; tests pass the ApiDestination store explicitly
- Import classes instead of qualifying them inline in the ApiDestination integration test
- Surface worker failures in the concurrent rate limit test by checking each Future
* docs: correct the EventBridge and IAM operation counts in the service matrix
* feat(eventbridge): execute target retry and dead-letter policies
PutTargets now validates, stores and returns a target's RetryPolicy and
DeadLetterConfig. Failed deliveries from PutEvents and scheduled rules are
retried with backoff within the configured attempts and event age, and
exhausted or non-retryable events are sent to the standard SQS dead-letter
queue with the AWS failure attributes.
* fix(eventbridge): order target retries by due time and honour a lowered retry limit
Pending retries are kept in a queue ordered by their next attempt, so each wake-up
takes only what is due instead of scanning every pending retry. The clock is read
again for each retry, so a slow target cannot let a later retry run past its event
age, and a reset mid-tick stops the remaining retries. A retry now checks the
target's current MaximumRetryAttempts before invoking it, as it already did for
MaximumEventAgeInSeconds.
* fix(eventbridge): drop a target retry that outlives a reset
An attempt still running when the emulator resets can fail afterwards. Its retry
or dead-letter delivery is now dropped, so a rule and target recreated under the
same names after the reset do not receive a pre-reset event. A scheduled retry
wake-up keeps only its due time, not the event.
* fix(eventbridge): wake a target retry at its due time after a slow attempt
The retry delay was measured from when the failed attempt started but counted from
when it failed, so every retry after a slow attempt woke late by the attempt's
duration, and an expired event reached its dead-letter queue late.
* fix(eventbridge): drop a removed target's retries and drive retries from one tick
RemoveTargets now drops the removed targets' pending retries, so a target re-added
under the same Id does not receive an event from before its removal. Pending retries
are taken by one periodic tick, as in the scheduler's dispatcher, instead of a timer
per retry, so a reset leaves no timers behind.
* fix(eventbridge): warn about a blank dead-letter queue ARN
PutTargets accepts a whitespace-only DeadLetterConfig Arn, since AWS constrains only
its length. Delivery skipped it without a word; it now gets the same WARN as any other
dead-letter queue that is not a standard SQS queue in the rule's region.
* feat(eventbridge): add Connection model and state enum
* feat(eventbridge): wire connection storage through EventBridgeService
* feat(eventbridge): implement CreateConnection
* feat(eventbridge): implement DescribeConnection and ListConnections
* feat(eventbridge): implement UpdateConnection and DeleteConnection
* feat(eventbridge): build connection responses with credential sanitization
* feat(eventbridge): dispatch Connection actions in EventBridgeHandler
* test(eventbridge): add Connection lifecycle integration test
* test(eventbridge): cover connection secret stripping and validation errors
* docs(eventbridge): document Connection actions
* fix(eventbridge): register ConnectionState for reflection and validate auth type changes
* chore: remove stray PR body helper file
* fix(eventbridge): default IsValueSecret to true when omitted on connection parameters
IsValueSecret is optional on Connection header/query/body parameters, and
AWS treats an omitted flag as secret. Reading it with asBoolean(false)
inverted that default, so a parameter that simply didn't set the flag
came back in cleartext from DescribeConnection instead of masked.
Reported by @abanna on PR #1897.
* test(eventbridge): cover DescribeConnection masking when IsValueSecret is omitted
Reproduces the leak abanna reported on PR #1897: a header parameter that
doesn't set IsValueSecret must still come back masked, not in cleartext.
Fails against the pre-fix asBoolean(false) default.
* feat(eventbridge): deliver events to event-bus targets
* fix(eventbridge): skip null resources when republishing to event-bus targets
* fix(eventbridge): validate Detail and resolve account for bus targets
readTree accepts any well-formed JSON value, so an input override producing
"hello" or [1,2] passed the guard and reached the target bus as a scalar
detail, with putEvents reporting success — a silent malformation rather than
the intended warn-and-drop. The pass-through arm had the same hole. Both arms
now share one isObject() check.
Bus targets also went through the two-arg putEvents overload, which passes a
null accountId, so a cross-account bus ARN resolved in the caller's account and
surfaced only as a warning. Thread the ARN's account through, as SQS targets
already do via the queue URL. Same-account and account-less ARNs still forward
null: only that path carries the legacy-key fallback in
AccountAwareStorageBackend.get().
* docs(eventbridge): document event-bus target behavior and limits
* fix(eventbridge): cap bus-to-bus forwarding at one hop, matching AWS
* feat(docs): generate Supported Actions tables from handler source
The "Supported Actions" tables in docs/services/*.md were hand-maintained and
drifted from the handlers. For example secrets-manager.md omitted RestoreSecret,
which SecretsManagerJsonHandler dispatches, and acm.md listed RenewCertificate,
which is not implemented anywhere in src/.
Derive the action list from handler source so it cannot drift, while keeping the
hand-written Description column:
- tools/docs/regen_action_docs.py extracts actions from `case "X" ->` switch arms
(including multi-label arms) and JAX-RS REST controllers, and rewrites only the
rows between the <!-- floci:actions --> markers. Descriptions are preserved by
action name; new actions get a "-" placeholder. PascalCase-only matching avoids
picking up SCREAMING_CASE labels from non-action switches.
- tools/docs/services.yaml registers 18 single-table switch services and lists the
remaining switch handlers under deferred_handlers, so the new-service sentinel
fires only on a genuinely unregistered handler.
- make docs-sync / docs-check / docs-test, plus a Python-only CI workflow that
gates on handler, doc, and tooling changes.
- Migrate 18 service docs into marker blocks, reconciling real drift (adds
RestoreSecret, ImportCertificate, and others; drops the unimplemented
RenewCertificate).
Revives the parser and CI gate from #738 by @ericbsantana and completes the
description-preservation its spec described. REST-mode, mixed-mode, multi-table,
non-tabular, S3, and ecr docs are deferred and tracked in deferred_handlers.
* docs: drop standalone design spec from action-docs tooling
Remove ideas/auto-generated-action-tables.spec.md and the four references
to it (CONTRIBUTING.md, Makefile, regen_action_docs.py docstring,
services.yaml). It was a planning artifact; the operational docs live in
CONTRIBUTING.md and the tooling is self-documenting. The #738 / @ericbsantana
credit is preserved in the PR description.
* chore: address review on action-docs tooling
- pin actions/checkout to v7.0.0 in docs-actions workflow to match the
repo-wide bump (#1690), so dependabot does not immediately flag the new file
- document in the generator docstring that a switch case label counts as
supported purely by existing, so a per-action UnsupportedOperation stub
would be a false positive (handlers here reject from the default arm)
* docs: regenerate action tables against current handler source
Resync the generated Supported Actions tables to handler source after
rebasing onto the latest main:
- cloudformation: add DescribeStackInstance and DescribeStackSetOperation
now emitted by the handler, and keep the implemented StackSet descriptions
- cloudtrail: add LookupEvents
- firehose: add UpdateDestination
- step-functions: add PublishStateMachineVersion, ListStateMachineVersions,
DeleteStateMachineVersion
- register the cloudcontrol handler in deferred_handlers so the strict
unregistered-handler gate passes (no standalone action table yet)
* fix(docs): prevent action-table generator from silently dropping actions
Address the latest review pass on the action-docs tooling:
- switch extraction now captures case arms whose labels wrap across lines
(valid Java 14+ syntax). The capture group excludes only `{ } ;` boundaries,
so it spans newlines between labels but stops at the arm's `->`. A wrapped
arm was previously missed, and docs-check would stay green because the doc
and the generated output agreed on the omission, defeating the whole
drift-prevention guarantee.
- REST extraction skips Javadoc / inline comments between a verb annotation
and the method signature; such a line otherwise reset the lookahead and
dropped the action.
- parse_marker_block raises a descriptive error when a marker is not on its
own line, instead of a bare "substring not found".
- doc, source, and registry reads/writes are pinned to UTF-8 so generation is
locale-independent (the docs contain non-ASCII text).
- the docs-actions push trigger watches Makefile and the workflow file,
matching its pull_request trigger.
Adds regression tests for the multi-line arm and comment-skip paths (20 total).
* feat(eventbridge): add TestEventPattern action
Exposes the existing rule pattern matcher as a public API so callers can
test whether a sample event would match an event pattern without firing
any targets. Adapts the AWS event envelope (lowercase source / detail-type
/ detail / resources) to the internal entry shape and delegates to the
same matchesPattern() helper that powers PutEvents rule dispatch.
Returns {"Result": <bool>} on success, InvalidEventPatternException (400)
on malformed pattern or missing event.
* fix(eventbridge): reject empty EventPattern in TestEventPattern
AWS marks EventPattern as a required field for TestEventPattern. The
previous implementation accepted null/empty values and silently delegated
to matchesPattern(), which returns true for blank patterns — turning the
API into an unintended match-all. matchesPattern()'s blank-is-match-all
behavior is intentional for rule dispatch (rules with no EventPattern are
scheduled rules that fire on every match attempt), but exposing it here
violates the spec.
Now throws InvalidEventPatternException (400) when EventPattern is null
or blank. Verified end-to-end via boto3: the typed exception is raised
client-side. The integration test that asserted the wrong behavior is
flipped, and a new test covers the missing-field case.
* fix(eventbridge): honor account/region from event and reject non-object Events
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs
had drifted from code behaviour. This sweep reconciles docs against the
current codebase on upstream/main.
- Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history
- Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58),
Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the
actual dispatch handlers rather than @Path annotation counts.
- Rewrite README "Supported Services" table to drop per-service op counts
(they drift too fast); point readers at docs/services/index.md
- Update 24 service docs for accuracy, add "Not Implemented" sections
where relevant (s3.md, lambda.md, api-gateway.md)
- Refresh configuration and getting-started docs
- Add EventBridge Scheduler and AppConfig to mkdocs nav
- Add AppConfig / AppConfigData rows to README and services index
following the 1.5.2 upstream release