Commit Graph
2224 Commits
Author SHA1 Message Date
Tyler Webb c6361cab91 feat(eventbridge): create partner event buses from EventSourceName (#7968)
* 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>
2026-11-12 19:03:15 -04:00
Priamo Germosen 8b625f7e30 fix(iam): hold a blank required member to its shape rather than reading it as absent (#8058)
A required member the request carried empty was answered as a member it
never carried: `requireParam` threw the null violation for a blank value
as well as for an absent one, and `validatedPolicySourceArn` handed a
blank to the resolver that answers an absent `PolicySourceArn`. On this
protocol an empty value is a member the request carries, so what a blank
breaks is the shape declared for it, and that is the constraint AWS's
validation layer reports.

For nearly every member nothing moves, because the constraints read
ahead of the operation already answer a blank against the minimum, the
pattern or the value set its shape declares: `RoleName=` breaks its
pattern, `Status=` its value set, `PolicyDocument=` both its minimum and
its pattern. Of every member read through `requireParam`, only
`serviceName` on `CreateServiceSpecificCredential` declares none of the
three. A blank there reaches the operation now, where a service name
nothing supports is `NoSuchEntity` with the name echoed as the caller
sent it, which is what LocalStack's AWS-validated snapshots record for a
malformed name as well as for an unsupported one.

`PolicySourceArn` is the one `arnType` member this package reads by hand,
the simulators answering an absent one in a sentence of their own. A
blank is held to the 20 characters the member declares now, which is the
answer `GetContextKeysForPrincipalPolicy` gives for the same member
through the model, so the two readers of it agree on the same input. One
left out keeps that sentence.

`docs/services/iam.md` records the split beside the wording an absent
member answers with, and four tests in the constraints class pin both
halves on both members. One assertion in the service-specific credential
tests pinned the old reading, a blank name said never to reach the
service check, and it moves with the fix: the blank reaches it and the
absent name is what the required-parameter check answers.
2026-11-12 19:02:40 -04:00
Priamo Germosen 9f1cccf83f feat(iam): check FIS, RAM, OAM and three more services by their REST routes (#8154)
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS Fault Injection Service, AWS RAM, CloudWatch
Observability Access Manager, AWS Resource Explorer, AWS Account
Management and AWS Control Catalog were among those: none of their 94
served routes had a rule.

Vendors the six models, so each route is checked as its operation's
action, on the resource its request names. A caller holding no grant
for them is now refused where the request used to pass; that is the
behaviour change.

Resource Explorer's five routes that S3 Vectors shares are matched on
the path without the prefix its filter moves them under. The FIS and
Resource Explorer tag routes are the shared controller's and keep its
bare /tags form. OAM's tag routes take the ARN as the rest of the path,
as the controllers serving them do, so an ARN sent with its slash
unencoded is checked too.

The request-resources generator reads these requests with no
hand-written correction, through four rules that hold for any service:
- A bare id after a path segment naming a type names that type:
  /safetyLevers/{id}/state is the lever whose state
  UpdateSafetyLeverState sets.
- A member fills the variables of a resource's own path before the
  account its ARN is in, so Account Management's AccountId is the
  member account of an accountInOrganization ARN.
- A type whose ARN is the account alone applies to a request leaving
  out its optional account member, when that member names another
  type: a request without AccountId acts on the caller's own account.
- A create makes its own type even when a member holds the resources
  the action acts on: CreateResourceShare makes the share, and its
  resourceArns are what the share holds.

Account Management finds that member account's organization and
management account in the caller's organization, through the lookup
the reader asks a service for the ARNs it stores, so a request naming a
member is checked on the ARN AWS checks.

The first rule also reads four CloudFront web ACL association
operations and four OpenSearch data source attachment operations on the
distribution or application their paths name. Floci serves none of
them.

An ARN fitting both a customer's format and one AWS owns is AWS's, so
an AWS managed permission is not also checked in the caller's account.

Regenerating the tables also brings in what AWS has added since the
last sync: eight Amazon Cognito user pool session operations and eight
Kinesis Analytics snapshot operations, none of which Floci serves. The
snapshot create's tags are read once the pinned botocore has it. The
count of tagged operations in iam.md is now the table's, 589, which
also takes 23 that earlier syncs added without moving it.
2026-11-12 18:59:01 -04:00
jwoa95 1bdc839350 fix(apigatewayv2): retain integration descriptions (#7998) (#8126)
Closes #7998

Validate description types before creating or changing an integration so malformed JSON returns BadRequestException instead of an uncaught ClassCastException. Preserve omitted, null and empty-string behavior. Cover create and update over REST and JSON 1.1, including rejection without stored changes.
2026-11-12 16:22:16 -04:00
soreavis 9ead504085 fix(organizations): refuse a request member of the wrong JSON type (#8141)
The Organizations handler read each member with asText, asInt or path,
so a Tags that isn't a list was read as no tags, a number where a
string belongs as its text, and a string MaxResults as a number.

Vendor botocore's Organizations request shapes with
tools/aws/regen_organizations_shapes.py, kept in sync by make
aws-data-check. Once the switch in handle finds a served operation,
walk the request against that operation's input shape with
RequestShapeCheck before the operation reads it, as Rekognition's
handler does. An operation Floci doesn't serve still answers
UnknownOperationException, whatever its body.

A mismatch is a SerializationException worded as DynamoDB's
deserializer words it. Organizations' own error and wording haven't
been measured.

The tag checks parseTags already makes still run: a null member counts
as absent in the walk, so a null or missing Key or Value and a repeated
key keep their InvalidInputException.
2026-11-12 16:10:12 -04:00
Priamo Germosen 81894c545d feat(iam): check API Gateway's routes by botocore's models (#8060)
API Gateway was the one REST service besides S3 that the registry
authorized by hand: seven rules gave every management route its HTTP
method's action, apigateway:GET, apigateway:POST and so on, with two
named exceptions written in. Its routes were vendored for the coverage
test only.

The developer guide gives the management API's actions as the HTTP
verbs, and the Service Reference lists most API Gateway operations the
action of their route's method beside permissions AWS checks only when
the request carries what they guard, such as UpdateRestApiPolicy for a
resource policy or iam:PassRole for a role. The authorized-actions
table now lists those operations, 55 of them, under authorizedByMethod,
and a request on such an operation's route is checked as the action its
own method names: TagResource is a PUT in v1 and a POST in v2. The
other 132 are the single-action renames the table already held,
RejectDomainNameAccessAssociation and PutRoutingRule among them, or
keep the action of their own name, as the portal, portal product and
routing rule operations do.

So the rules go and API Gateway leaves the hand-routed scopes. Every
route Floci serves is checked as before. Its v1 tag routes are the
shared tags controller's, so they take an ARN sent unencoded and keep
the bare /tags forms, whose tagging form is a POST although v1 tags
with a PUT. v2's tag routes take an unencoded ARN too, as its
controller does.

The routes Floci does not serve, those of portals, portal products and
routing rules, are now checked as the actions AWS names for them rather
than as their method. A path no route of either model has, such as a
deployed API's execute path signed for apigateway, is no longer checked
as a management action: AWS authorizes an invocation as
execute-api:Invoke, which the execute path checks itself.

Regenerating the authorized-actions table also brings in two Lake
Formation operations AWS has added since,
GetGlueFunctionSessionContext and GetTemporaryGlueFunctionCredentials,
both authorized as lakeformation:GetDataAccess. Floci serves neither.

The passed-role generator imports the authorized-actions one, so the
online IAM gate checks the passed-role table for this change too, and
the table no longer held: AWS now passes EMR StartSession's role to
managed-compute.elasticmapreduce alone. Syncing it had failed since AWS
listed iam:PassRole for three more operations the generator found no
role member on, and asks a reason for.

CloudWatch Logs StartQuery names no role at any depth, in the pinned
botocore or the newest, so it is not read for that reason. SSM
RegisterDefaultHostManagementConfiguration and Kinesis Analytics
ImportSnapshot are newer than the pinned botocore, so their requests
cannot be read yet. They get a reason the sync and the offline gate
both refuse once the pinned models carry the operation, so a bump
cannot leave their roles unread. Floci serves StartQuery and neither of
the others.

That refusal caught two entries the pin had already outgrown. ECS
CreateGateway and UpdateGateway were excused as operations botocore
does not model, from the day the table was generated, and the pin has
had both for a while, each naming the infrastructureRoleArn of "the IAM
role that the gateway assumes to create and manage infrastructure on
your behalf". The reference passes it to ecs.amazonaws.com, so the
table reads it for both now. StartSession's role goes where the
reference sends it, and the hand mapping that picked elasticmapreduce
out of its two services is gone. Floci serves neither ECS gateway
operation nor StartSession.
2026-11-12 16:07:36 -04:00
Roger Far 9831603f67 feat(cloudfront): add CloudFront KeyValueStore support (#8108) 2026-11-12 14:19:52 -04:00
jwoa95 5da8045bb2 fix(cognito): reject undeclared custom user attributes (#7994) (#8124) 2026-11-12 14:04:51 -04:00
jwoa95 021e580a60 fix(ecs): preserve requested service platform version (#7997) (#8125)
* fix(ecs): preserve requested service platform version

* fix(ecs): restore requested platform version on rollback

Snapshot the requested service setting separately from the resolved revision version so rollback preserves LATEST. Retain a fallback for older snapshots and cover numeric versions, serialization and rollback after restart.
2026-11-12 14:02:05 -04:00
Priamo Germosen 7ebed877a8 feat(emr): run a cluster's core and task nodes in containers of their own (#8066)
A docker cluster's YARN and HDFS ran on its primary node alone, however
many instances the cluster named. On EMR "Core nodes run the Data Node
daemon", "a core node runs YARN NodeManager daemons, Hadoop MapReduce
tasks, and Spark executors", and "Task nodes don't run the Data Node
daemon".

- Each core and task node is a container of its own on the cluster's
  network, with its data in a volume of its own, its name there the
  private DNS name ListInstances gives it. The primary node keeps a
  DataNode and a NodeManager only on a cluster created with no core
  node, which keeps them as core nodes are added, and a primary node
  whose volume holds a DataNode's data runs it in any case, so the
  blocks on it stay in reach.
- ListInstances gives each group's instances addresses of their own, so
  an instance keeps its address while another group resizes.
- How many follows the instance groups' counts or the instance fleets'
  target capacities, at most yarn-max-worker-nodes, core nodes first. A
  fleet's unit of capacity is one node. With 0 a cluster runs on its
  primary node alone.
- HDFS keeps what EMR's does: one copy of a block below four core nodes,
  two below ten, three otherwise, or the hdfs-site classification's
  dfs.replication. Steps' Spark, Hive and hadoop clients write that many.
- A resize reaches the nodes of a cluster a step has started them on, on
  another thread: a new node takes work once it has registered, and one
  no longer wanted is decommissioned, HDFS and YARN telling when it may
  go, within EMR's default hour, each node its own, then goes with its
  data. Core nodes stop at the copies HDFS keeps.
- A core node's NodeManager is decommissioned only once HDFS has moved
  its blocks, as a decommissioned NodeManager exits, which ends the
  node's container, its DataNode with it. A core node that has gone
  stays among HDFS's excluded nodes until the NameNode has it dead, 40s
  after it stopped, so the copies it held never count again.
- A core node that stops before HDFS has moved its blocks starts again
  on its data, and one a shutdown cut off while it was decommissioned
  starts again with the cluster's next step, from its volume, which
  carries its name, to be decommissioned then. A task node's volume a
  shutdown left goes.
- A decommissioning round that fails, a refresh of HDFS's or YARN's
  lists among them, is tried again on the next; a node Docker will not
  remove yet stays to be removed then, and one whose start a teardown
  passed goes. A cluster's end removes the volumes of nodes that have no
  container, and finishes even when Docker cannot list its nodes.
- The node list is read inside the cluster's lock, so a step queued
  before a resize starts the nodes asked for by then.
- Container logs come from every node, a decommissioned one's first.
2026-11-12 13:59:34 -04:00
galsuchetzky-act 254d9b9610 fix(lambda): retain MicroVM run settings and image version (#8123)
* fix(lambda): retain MicroVM run settings and image version

Retain execution settings in run responses and stored MicroVM metadata, and select the requested image version. Validate request bodies with vendored model constraints through the shared request validator.

* fix(lambda): share connector defaults and verify list summaries

Use the same managed connector projection for image and MicroVM responses. Cover the requested version and unchanged summary fields in ListMicrovms, including explicit-version and omitted-version controls.
2026-11-12 13:55:28 -04:00
jwoa95 021ce5e59b fix(cognito): expose response headers for allowed browser origins (#8109) 2026-11-12 11:29:07 -04:00
Allen Sanborn 639fbe38d0 fix(ec2): give privileged systemd guests a private cgroup namespace (#7353)
Systemd guests ran with --cgroupns=host and the host's /sys/fs/cgroup bound
in, so every guest's systemd managed the same cgroup tree as the Docker
host and as each other. Two guests running Kubernetes nodes (kubelet with
the systemd cgroup driver, as Kubernetes The Hard Way configures it)
shared one kubepods.slice: both nodes saw the same inode, and each kubelet
tore down the other's pod sandboxes, so every pod restarted in a loop
(SandboxChanged, "network namespace for sandbox ... is closed").

A private namespace without the bind, as kind runs its nodes, gives each
guest's systemd its own writable subtree, because Docker mounts it
read-write for a privileged container. Measured on OrbStack (cgroup v2):
two guests boot to 'running', each with cgroup 0::/init.scope on a
distinct cgroupfs root.

A guest under security-group enforcement runs unprivileged, and Docker
mounts an unprivileged container's private cgroupfs read-only, where
systemd cannot create its slices. That guest keeps the host namespace and
the read-write bind, so it boots as before; the docs say its cgroups stay
shared.

fix(ec2): keep the IMDS proxy out of a systemd guest's root cgroup

A privileged systemd guest now has a private cgroup namespace, and a
docker exec lands in that namespace's root. Floci leaves its link-local
IMDS proxy (socat) running from such an exec, so the guest's root cgroup
held a process. cgroup v2 will not enable controllers in a cgroup's
subtree_control while it holds processes, so the root's stayed empty and
kubelet with the cgroupfs driver died creating kubepods.slice
("openat2 /sys/fs/cgroup/kubepods.slice/pids.max: no such file or
directory"). Whether a node hit it depended on whether anything else
enabled the controllers before the proxy started.

The proxy's install and start scripts now move their own shell into the
leaf /sys/fs/cgroup/floci first, so socat and everything else they start
stay out of the root. They do so only at the root of a cgroup v2
namespace whose cgroupfs is writable; a host-namespace container, a
cgroup v1 host and a read-only mount run as before. A plain directory
rather than systemd-run, because the proxy starts while the guest's
systemd may still be booting, and systemd neither reaps nor moves a
cgroup it did not create. EKS's pod-identity proxy shares the script.

The Docker integration test launches a privileged systemd guest through the real
container spec. It now also reads /proc/self/cgroup, which must be 0::/ at the
namespace root, and creates and removes a directory under /sys/fs/cgroup, so
native Linux CI fails if the guest falls back to the host cgroup namespace.

Rewrap the class javadoc, rename the test to cover both the modules and the
cgroup namespace, and comment what each cgroup probe does and does not prove.
2026-11-12 11:28:20 -04:00
jwoa95 14f01c80e8 fix(eventbridge): validate scheduled rule rate expressions (#7996) (#8113)
* 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.
2026-11-12 11:26:00 -04:00
Jackson PriceandAndre Kurait c0a087a597 fix(acm): retain certificate tags during reimport (#8119)
Keep the current tags when replacing an imported certificate under its
existing ARN. Certificate.setTags already copies the map and normalizes
null, so use that boundary for initial imports and reimports alike.

Cover tag retention and replacement material through the AWS SDK in
commercial and GovCloud regions, including later tag additions/removals
and an untagged certificate.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-12 11:15:12 -04:00
David 654473f754 feat(rds): add blue/green deployments for DB instances (#8104)
CreateBlueGreenDeployment stages a green copy of a PostgreSQL, MySQL or
MariaDB instance with the target engine version, parameter group, class
and storage, linked to the blue instance as a read replica and loaded
from a dump of it. SwitchoverBlueGreenDeployment gives green the blue
identifier, ARN, endpoint and tags and renames blue to <name>-old<n>;
the container manager moves each running container to its new ARN so
stop and delete still find it. DescribeBlueGreenDeployments supports the
four documented filters and paging, and reports INVALID_CONFIGURATION
when a member is gone. DeleteBlueGreenDeployment honours DeleteTarget
before switchover. Deployments are taggable by their deployment ARN.

Closes #8069
2026-11-12 11:10:15 -04:00
soreavis acdbde836a fix(config): give the configuration recorder an ARN and keep its tags (#8117) 2026-11-12 10:54:08 -04:00
galsuchetzky-act bb689885a3 fix(lambda): retain MicroVM image request configuration and tags (#8102) 2026-11-12 10:51:23 -04:00
soreavis b28caac441 fix(organizations): resolve the resource policy ID in tag operations (#8111)
TagResource, UntagResource and ListTagsForResource answered
TargetNotFoundException for the organization's resource policy, because
resolveTagOwner matched account, root, OU and policy IDs only. The
model's TaggableResourceId pattern accepts rp- IDs, and AWS's own
CloudFormation handler for AWS::Organizations::ResourcePolicy tags the
policy and lists its tags through that ID.

resolveTagOwner now matches the organization's resource policy ID and
saves the organization, as the root branch does. Any other rp- ID still
answers TargetNotFoundException. The code comments that said a resource
policy is not a TagResource target are corrected, and the docs table
lists the resource policy among the tag targets.
2026-11-12 10:44:30 -04:00
Niels Kootstra efd8971241 fix(cur): keep report definition tags and serve the tag operations (#8095)
PutReportDefinition now stores its Tags on the report definition, and
TagResource, UntagResource and ListTagsForResource read and change them
by ReportName instead of answering empty stubs. ModifyReportDefinition
keeps the tags, a missing report answers ResourceNotFoundException, and
the TagList and TagKeyList constraints from the model are checked.

Closes #7952

PutReportDefinition and TagResource now fail with ValidationException when the report would hold more than 50 tags, when Tags is not a list, or when a tag key, value or TagKeys entry is not a string.

tools/aws/regen_cur_shapes.py vendors the TagResource, UntagResource and ListTagsForResource input constraints from botocore, and CurRequestShapes checks them, and the Tags of PutReportDefinition, through RequestConstraintCheck in place of the hand-written limits.
2026-11-12 10:23:21 -04:00
jwoa95 13ab84ed9f fix(cognito): hide unknown users in password authentication (#8005) (#8103) 2026-11-12 09:48:13 -04:00
jwoa95 df1d850d71 fix(rds): apply minor engine upgrades to backing databases (#8089)
Closes floci-io/floci#8007

Persist whether a standalone instance has never initialized its database. Protect engine versions before backend startup so runtime loss and proxy failures cannot expose existing storage to a metadata-only version change. Update SDK compatibility assertions to reject unsupported upgrades and verify resizing separately.

Apply supported minor upgrades using the version-specific image on the existing volume and endpoint. Keep major upgrades, downgrades, and pinned-image changes blocked before mutation. Preserve the never-started case, report failed restarts honestly, and restore successful minor-upgrade coverage in the Java SDK compatibility suite.
2026-11-12 09:37:43 -04:00
Niels Kootstra 17af8368b5 fix(lambda): fail an image function's init when Lambda's user cannot enter its working directory (#8047)
Closes #7979

Resolve symlinks on the working directory's path, relative or absolute,
and check every directory on the resolved path. Stop the check at a
function's EFS mount path, which Lambda enters as the access point's user.

Build the Dockerfile-only build context in one place,
DockerBuildContext.ofDockerfile, for the helper image and the two Docker
tests that built it by hand.

It created an application named test-app, which AppConfigIntegrationTest looks up by name when both run in one shard.
2026-11-12 09:15:36 -04:00
TATSUNO “Taz” Yasuhiro 60252c9b7f feat(dynamodb): serve DescribeLimits and DescribeEndpoints (#8099)
* feat(dynamodb): serve DescribeLimits and DescribeEndpoints

DynamoDB reports the default quotas of 80,000 read and write capacity
units per account and 40,000 per table. It names its Regional endpoint
with a cache period of 1,440 minutes.

* fix(dynamodb): name Floci's own address in DescribeEndpoints

With endpoint discovery on, the AWS SDK for Java 2.x sends later
requests to the address DescribeEndpoints names, even when the client
sets an endpoint. The Regional AWS host sent them to real DynamoDB.
2026-11-12 09:10:59 -04:00
Vũ Thế Huy 59c2b46e1c feat(redshift): implement remaining COPY options and load diagnostics (#8075)
Stream records through CopyBulkLoader.Cursor in loadRecords and reuse writeRecord, eliminating duplicate decompression, line skipping, record reading, heap tracking and blank line filtering.

Verify Cursor record iteration, line tracking and raw byte capture, along with writeRecord chunking across PostgreSQL CopyData wire frames.
2026-11-12 09:10:43 -04:00
Vũ Thế Huy 8a817ec5e9 feat(redshift-serverless): read and list snapshots another account shares (#7899)
GetSnapshot and ListSnapshots with an ownerAccount other than the caller's now read the
owner's snapshots and return only the ones the snapshot resource policy shares with the
caller. A snapshot is never shared across partitions.
2026-11-12 09:03:53 -04:00
Murtuza Chhil 77d73ee4b7 feat(paymentcryptography): the key exchange, with TR-31, RSA-OAEP and ECDH (#7862) 2026-11-12 08:59:48 -04:00
galsuchetzky-act f2a0bfce4e fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs (#8088)
* fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs

Keep runtime ARNs stable across versions and use the parent runtime ID and endpoint name for endpoint ARNs. Update API responses, ARN lookups, tagging dispatch and CloudFormation references together.

* fix(bedrock-agentcore): preserve legacy and harness runtime lookups
2026-11-12 08:17:29 -04:00
jwoa95 b2fa9b3f6c fix(lambda): enforce 4 KB environment variable limit (#7995) (#8055)
Validate the compact UTF-8 JSON environment before function creation or configuration mutation. Both paths previously accepted the 5,000-character value reported in #7995. Cover exact byte boundaries, aggregate variables, Unicode, JSON escaping, and rejected-update atomicity through the AWS SDK.

Stop quota serialization through a bounded UTF-8 counting sink without allocating complete JSON and byte-array copies. Keep unchanged legacy environments out of CloudFormation configuration updates while validating changed variables and preserving environment removal. Add early-stop, one-megabyte input, Unicode buffer-boundary, and legacy-stack rollback regressions.

Include AWS's String measured diagnostic while retaining at most 5,120 UTF-8 bytes and terminating larger input early. Drop incomplete trailing UTF-8 characters before adding an ellipsis. Keep the 1 MB robustness request on CreateFunction, and assert every SDK configuration-update body stays below the separate 5,120-byte request limit. Cover complete measured JSON and bounded Unicode previews.
2026-11-12 07:51:13 -04:00
soreavis 33968bca39 fix(memorydb): keep user and ACL tags and let them be tagged (#8082)
CreateUser and CreateACL never read their Tags member, and ListTags,
TagResource and UntagResource resolved every ARN as a cluster, so a
user or ACL ARN answered ClusterNotFoundFault and neither resource
could be tagged at all.

User and Acl now keep a tag map, set from Tags on create as
CreateCluster already does. The three tag operations pick the
resource from the ARN: user/ and acl/ look the name up in the current
Region and require the stored ARN to match, answering
UserNotFoundFault or ACLNotFoundFault, and any other ARN goes through
clusterByArn as before. The built-in default user and open-access ACL
are not stored, so they still answer the not-found fault. Users and
ACLs saved before this change have no tags field and load with an
empty map.

Fixes #7956
2026-11-12 07:40:35 -04:00
Saim Zaib 35bdfdcb3f feat(sns): trust FLOCI_TLS_EXTRA_CA_PATH for HTTPS subscriptions (#8063)
* feat(sns): trust FLOCI_TLS_EXTRA_CA_PATH for HTTPS subscriptions

SnsService built its delivery HttpClient without an SSLContext, so an
HTTPS subscription whose endpoint has a certificate from a private CA
never got the SubscriptionConfirmation or any notification. Floci only
logged "Failed to reach SNS endpoint".

The @Inject constructor now passes ContainerCaBundle.sslContext(config)
down to the constructor that builds the client, as EventBridgeInvoker
does. The SubscriptionConfirmation and notification delivery share that
one client. It stays pinned to HTTP/1.1, and hostname verification
stays on. The other constructors build the client as before.

Closes #8033

* test: share the /hook HTTPS endpoint between the extra CA delivery tests

LocalHttpsServer.hook starts a localhost HTTPS server that passes each
request to /hook to a callback and answers 200, and hookUrl gives its
URL. EventBridgeInvokerApiDestinationTest and the new SNS test use them
instead of each writing the endpoint out.
2026-11-11 22:49:23 -04:00
jwoa95 a27670c4bb feat(rekognition): add face collection lifecycle and search (#8001) (#8004)
Recreate the reviewed Rekognition changes on the existing upstream main base using a verified commit. The complete file tree is identical to PR head 19f259b43e1ec8a3ce5fd2a50eb9c21e4ed604df, preserving the collection, pagination, persistence and model-validation fixes while removing the unsigned merge.

Generate constraints for every modeled operation with constraints=True. Select the served operation in the handler, validate its request once, then dispatch. Preserve UnknownOperationException for unserved actions.

Move constraint tests to the handler boundary and verify newly modeled operations are detected without maintaining an allowlist. Verified 189 Java tests, 55 generator tests, Checkstyle, generated-data, documentation and partition checks. Addresses review 5865133468.
2026-11-11 22:19:38 -04:00
Priamo Germosen c9d9ba24f4 fix(emr): refuse reading the managed scaling policy of an ended cluster (#8065)
GetManagedScalingPolicy returned the policy of a cluster that was
shutting down or had ended. AWS answers ValidationException "A job flow
that is shutting down, terminated, or finished may not be modified."
there, as Terraform's acceptance runs recorded, and Terraform's provider
reads that answer as the policy being gone. Floci kept returning it, so
a refresh after termination kept a policy AWS reports gone.

A TERMINATING, TERMINATED or TERMINATED_WITH_ERRORS cluster now gets
that answer. emr.md no longer says no answer is recorded for the managed
scaling calls: Terraform's provider also expects it from
RemoveManagedScalingPolicy.
2026-11-11 19:50:26 -06:00
Priamo Germosen 4c9572b95b fix(emr): refuse changes to a cluster that is shutting down or ended (#8037)
ModifyCluster, the four Set* setters, and Put and Remove of a cluster's
managed scaling, auto-termination and automatic scaling policies all
changed a TERMINATED cluster, and AddTags and RemoveTags its tags.

AWS documents these for running clusters, but no answer for an ended
one is recorded. So they give the one AWS gives AddJobFlowSteps and
ModifyInstanceFleet, "A job flow that is shutting down, terminated, or
finished may not be modified.", in the code each operation's model
points at, as AddInstanceGroups and AddInstanceFleet already did for a
TERMINATING cluster: InvalidRequestException with ErrorCode
INVALID_JOB_SHUT_DOWN for ModifyCluster, ValidationException for the
others, whose models declare no InvalidRequestException. A Set* request
naming such a cluster changes none of the clusters it names.

AddInstanceGroups and AddInstanceFleet now answer a TERMINATED cluster
that way too, in place of "Cluster <id> is terminated.", which no source
has.

The Management Guide says "you cannot add, edit, or remove tags from a
terminated cluster" and names no error. AddTags and RemoveTags refuse an
ended cluster with InvalidRequestException "Tags cannot be modified on
terminated clusters.", the message a tagging tool matches from AWS.
2026-11-11 14:08:56 -06:00
Priamo Germosen a0741e5011 fix(emr-serverless): keep an application with runs going from stopping (#8038)
StopApplication stopped an application whose runs had not finished,
where the API reference says "All scheduled and running jobs must be
completed or cancelled before stopping an application."

A run that has not finished, a STREAMING or CANCELLING one included, now
refuses the stop with ValidationException, the one error the model
declares for it, carrying that sentence, as AWS's own message is not
recorded. The check holds the job runs' lock, as StartJobRun's admission
does, so no run starts between it and the stop. Step Functions'
stopApplication goes the same way.
2026-11-11 14:05:46 -06:00
Priamo Germosen 9e6f62e959 fix(cloudfront): hold a viewer certificate to the rules its entry states (#8028)
A distribution could name a certificate in ACMCertificateArn and in
IAMCertificateId at once, and could name one in either of them without the
MinimumProtocolVersion and SSLSupportMethod that go with it. It could also
carry a security policy or a viewer support method outside the values those
members admit, carry SSLv3 alongside sni-only, and claim
CloudFrontDefaultCertificate while naming a certificate of its own. The
ViewerCertificate entry states every one of those rules, and nothing here
read any of them, so a configuration AWS refuses was taken and the
distribution went on to serve it.

They are read now on the distribution create and the distribution update,
and the shape of the protocol members before any of it, so a request that
breaks a rule is refused for the rule and not for a certificate nothing
matches. A member carried blank counts as no value, the way a blank location
member already names no certificate, and a distribution on the CloudFront
domain name needs neither location member.

Two of the refusals are published. A MinimumProtocolVersion outside its
enumeration is InvalidMinimumProtocolVersion, whose own sentence is that the
minimum protocol version specified is not valid. SSLv3 alongside sni-only is
InvalidProtocolSettings, whose sentence names that pair and nothing else and
which is the same rule as the floor the member states for SNI, "you must
specify TLSv1 or higher", SSLv3 being the only value below TLSv1. That code
is declared on CreateDistribution, CreateDistributionWithTags and
CopyDistribution and has never been declared on UpdateDistribution, which
has declared InvalidMinimumProtocolVersion since 2015, so the update answers
the pair with the code it declares and keeps the pair's published sentence.
The declared code is the one a caller's SDK can map, an undeclared one
reaching it as a generic error, and the sentence keeps the two causes the
update answers under that one code apart.

The others are readings. An SSLSupportMethod outside its enumeration has no
code of its own and answers InvalidArgument, what this service already
answers a member outside its shape with. The three rules about the
certificate itself answer InvalidViewerCertificate 400: InvalidArgument and
InvalidMinimumProtocolVersion are modelled on both writes as well and no
sentence says which one a caller gets, and the Developer Guide page that
enumerates what InvalidViewerCertificate answers reaches none of those
cases, naming the certificate's own trust, its chain, its format and the
names it covers. That code's own documentation is that a viewer certificate
specified is not valid, which is what each of the three carries.

One rule in the group replaces a value instead of refusing the request.
MinimumProtocolVersion's entry says that when CloudFrontDefaultCertificate
is true CloudFront "automatically sets the security policy to TLSv1
regardless of the value that you set here", so the policy such a request
asks for is overwritten and the config reads back TLSv1. A distribution
created with no ViewerCertificate at all already read as the default
certificate and reads TLSv1 with it now, where it had been answering
TLSv1.2_2021.

Two more readings go with the group. The claim itself is a member declared
boolean, so it is held to the four forms XML gives a boolean, true, false, 1
and 0, rather than read for the word true alone: taken for false, a request
saying yes would dodge every rule the member governs, the refusal beside a
named certificate and the replaced policy alike. Anything else answers the
InvalidArgument this service answers a member outside its shape with,
CloudFront modelling no error for a malformed document. And the SSLv3 pair
is read for a distribution on a certificate of its own alone, since on the
CloudFront certificate the policy is replaced and the value that would make
the pair is discarded, so refusing the request for it would contradict the
override. Both enumerations are read either way.

The us-east-1 restriction AWS states for ACM certificates is left
unenforced, as is the /cloudfront upload path before it: refusing either
here could meet a distribution somebody already built. All of the above,
that included, is set out in docs/services/cloudfront.md.
2026-11-11 14:05:35 -06:00
Jimmy Liu Jia a609eb2824 fix(logs): preserve and manage destination tags (#8030) 2026-11-11 15:58:52 -04:00
jwoa95 a6da82af8a feat(logs): support saved query definitions (#7999) (#8003)
* feat(logs): support saved query definitions

Closes #7999

* fix: preserve saved-query retries and fence reset writes

Keep client-token request snapshots and returned IDs separate from mutable query definitions. Delayed create and update retries preserve newer content, reject conflicting input, and do not resurrect deleted definitions. Persist retry records with the configured account-aware CloudWatch Logs storage until reset.

Gate saves and deletes through beforeReset/afterReset under the service monitor so reset drains active writes and rejects new writes throughout the storage wipe.

Validation: 137 focused service, SDK integration, reset, and existing CloudWatch Logs regression tests passed. Checkstyle, docs-check, partition-check, and git diff --check passed.

* fix: validate saved queries against vendored Logs constraints

Include all three saved-query actions in the existing botocore constraint generator and share RequestConstraintCheck with delivery handlers. Return InvalidParameterException for saved-query constraints while preserving delivery ValidationException messages. Remove duplicated lengths, patterns, enums, list sizes, and type checks from the service and handler; retain domain checks for retries and query-language compatibility.

Reuse AwsTestClients for SDK integration fixtures. Cover modeled errors before service calls, nested parameters, valid maximum sizes, and existing saved-query retry/reset behavior.

Validation: 179 focused Java tests and 50 request-shape generator tests passed. Generated-data freshness, Checkstyle, docs-check, partition-check, and git diff --check passed.
2026-11-11 15:55:38 -04:00
David 2fe25793c8 fix(iam): check Security Hub and GuardDuty routes under enforcement (#7874)
Neither REST model was vendored in rest-routes.json and no rule mapped
their routes, so under enforcement every Security Hub and GuardDuty
request resolved to no action and was let through: a user with no
policies could EnableSecurityHub or ListDetectors.

- regen_rest_routes.MODELS reads securityhub and guardduty;
  rest-routes.json takes their routes from botocore 1.43.118, and
  iam-authorized-actions.json their actions of no resource type
  (securityhub 31, guardduty 70). Nothing else changed.
- Both move from NOT_COVERED to NAMESPACES in the table of request
  resources: 228 operations, 3350 over 46 namespaces, no other entry
  changed. Security Hub's hub actions are checked on the caller's hub
  in the Region, hub/default, the ARN Security Hub gives it, and
  GuardDuty's detector and publishing destination operations on the
  detector their path names.
- The generator gains a rule: an optional top-level member holding the
  ARN of a type whose format has no variable of its own also names
  that type when the request leaves it out. DescribeHub with no HubArn
  is so checked on hub/default, as AWS checks it, rather than on *,
  which would refuse a grant scoped to the hub. The rule changes no
  other operation.
- Both move to NAMESPACES in the tag-on-create table too: an
  EnableSecurityHub carrying tags also needs securityhub:TagResource on
  the hub, a GuardDuty create carrying tags guardduty:TagResource, and
  the create is checked with aws:RequestTag and aws:TagKeys.

Regenerated from the Service Reference retrieved 2026-11-11. It now
also gives two Lake Formation operations, GetGlueFunctionSessionContext
and GetTemporaryGlueFunctionCredentials, checked as
lakeformation:GetDataAccess; they are left to the next sync, which
--verify reports without failing. Macie is read by #7869.

IamRestRouteEnforcementIntegrationTest checks both services: a caller
with no grant refused, a grant scoped to the hub or detector let
through, another Region's hub and another detector refused, and a deny
holding under an allow on everything. IamTagOnCreateEnforcementIntegrationTest
checks a hub enabled and a detector created with tags: TagResource
needed, a request tag condition applied, and an untagged create
needing its own action alone. All four fail on main. iam.md says so.

Closes #7830
2026-11-11 15:01:28 -04:00
jwoa95 77587de2e6 feat(athena): support named queries (#8002)
Closes #8000

Workgroup deletion bypassed saved-query storage and ignored RecursiveDeleteOption. Reject non-recursive deletion when saved queries exist, and remove saved queries and retry records before deleting the workgroup. Serialize deletion with named-query creation to prevent orphaned records.

Vendor all Athena input constraints from pinned botocore and check requests through RequestConstraintCheck. Remove copied named-query bounds and type checks, allow creation without a client request token, and share workgroup scans and isolated test-client setup. Update required-field expectations and cover generation drift, nested constraints, Unicode bounds, and untokened creation.

Move the standard member-constraint Messages implementation and formatter into RequestConstraintCheck, parameterized by error code. Migrate Athena, ECR, and both Payment Cryptography APIs and remove the redundant PaymentCryptographyShapeErrors class. Preserve HTTP 400, existing rule wording, operation-prefix removal, nested list paths, and each service error code with shared contract and service tests.
2026-11-11 14:08:46 -04:00
Allen Sanborn 475fb1822a feat(ec2): EC2 Instance Connect Endpoint tunnel (open-tunnel / eice SSH over WebSocket) (#7519) 2026-11-11 14:08:37 -04:00
Hector Ventura ed28e665a9 docs: list X-Ray, QuickSight, Resource Groups and the Payment Cryptography data plane in the README (#8034)
The Service Matrix documents these four services, but the README's Supported Services table never named them, and it called SageMaker by a name that matches no matrix row. Also drop a stray SageMaker bullet left at the bottom of the matrix page, under Common Setup, since #1949; the matrix row covers it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-11 13:42:12 -04:00
Vũ Thế Huy 9f8593a062 fix(redshift): prune Spectrum partitions for binary integer binds (#7912) 2026-11-11 13:06:00 -04:00
Priamo Germosen d250eb276e fix(s3): refuse an unserved sub-resource and keep a key's own slashes (#8019)
A bucket request that names a sub-resource Floci does not serve fell through
to the bucket's own operation: DELETE ?metadataConfiguration and
?metadataTable deleted an empty bucket, GET ?abac and ?metadataTable listed
it, PUT ?abac created a bucket that did not exist, and HEAD ?acl ran
HeadBucket. The same happened to a sub-resource sent with a method AWS defines
none for, such as DELETE ?versioning. A POST naming one got a 400 asking for
?delete, and no IAM check at all.

The bucket handlers, HEAD and POST among them, now refuse such a request
where they would have run the bucket's operation. A sub-resource the AWS model
defines for the method is answered 501 NotImplemented, and one it defines for
other methods only 405 MethodNotAllowed, as DELETE ?accelerate already was.
A browser-form upload and DeleteObjects still run first on a POST. The
sub-resources are read from botocore's S3 model in the vendored
rest-routes.json, so one AWS adds is refused once the table is regenerated,
not run as the bucket, and their names from the parsed query parameters, so
an escaped & inside a value, ?prefix=reports%26abac, names none. The IAM
check matches: an unserved sub-resource is checked as the action the Service
Reference gives the operation it names (DELETE ?metadataTable needs
s3:DeleteBucketMetadataTableConfiguration, not s3:DeleteBucket, and
POST ?metadataTable s3:CreateBucketMetadataTableConfiguration), which lets
the route coverage test drop the two operations it exempted.

A key made only of slashes was read as the bucket too: JAX-RS collapses
PUT /bucket// to the bucket's path, so it ran CreateBucket and was checked as
s3:CreateBucket, where it writes the key "/". A filter now escapes such a
key's slashes in the path the router matches, path-style and virtual-hosted,
so S3 and the IAM check both act on the object, arn:aws:s3:::bucket//. One
trailing slash, /bucket/, is still the bucket.

The resource ARN a request is checked against read the same collapsed path,
which named another object whenever a key carried a slash of its own.
PUT /bucket//email.txt stores the key "/email.txt" and the controller and the
condition resolver both read it that way, from the path as it arrived, while
the ARN came out as arn:aws:s3:::bucket/email.txt: a grant on that object
covered this one, and a statement naming bucket//* matched nothing it names.
A key with a double slash inside it, a//b.txt, was checked as a/b.txt the
same way. The ARN is now built from the key those two already read, through
one reader the three share, so the object stored, the object a condition
describes and the object a policy is matched against are the same one. An S3
Control operation, told apart by the operation as before and not by its path,
names no object and is left as it was: the ARN in its path is still taken as
written.
2026-11-11 10:53:14 -06:00
Vũ Thế Huy 4d4f20b812 feat(redshift): execute S3 auto-copy and COPY JOB RUN (#7898)
A job failure (SQLState 42xx or 0A000) cannot clear on its own, so re-marking the bucket made every sweep reconnect and log a WARN. The job now waits for the next upload. The predicate is shared with CopyJobRunner via S3TransferException.isJobFailure.
2026-11-11 12:49:20 -04:00
Andre Kurait b954b4fb87 fix(dynamodb): honor OR in legacy Query and Scan filters (#8031)
* fix(dynamodb): honor OR in legacy Query and Scan filters

Pass ConditionalOperator to the shared legacy read-filter evaluator while retaining default AND behavior and read-before-filter pagination. Reuse one nested-map fixture builder for the four existing expressions. Separate follow-up requested in upstream #8023.

Signed-off-by: Andre Kurait <akurait@amazon.com>

* fix(dynamodb): validate legacy binary filters before matching

Validate every legacy QueryFilter and ScanFilter binary operand through the existing attribute validator before evaluating items. Keep ConditionalOperator validation first and retain valid-filter short circuit behavior. Add actual JSON wire invalid and valid binary controls.

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-11 12:46:45 -04:00
galsuchetzky-act aea5c9ad05 fix(glue): paginate catalog database, table, partition and version lists (#7827) 2026-11-11 12:23:16 -04:00
Vũ Thế Huy e37f45f714 feat(redshift-serverless): allow cross-account restore of a snapshot its policy shares (#7801) (#7803)
* feat(redshift-serverless): allow cross-account restore of a snapshot its policy shares (#7801)

RestoreFromSnapshot with an ownerAccount other than the caller's now reads the
snapshot from the owner's account and evaluates its resource policy for
redshift-serverless:RestoreFromSnapshot. A policy that allows the caller or the
caller's account grants the restore, an explicit Deny wins, and a snapshot with
no policy is not shared (AccessDeniedException). The dump is read from the
owner's directory and the restore targets the caller's namespace and workgroup.

* fix(redshift-serverless): restore a shared snapshot by the owner's ARN and check its policy under the service lock

A cross-account RestoreFromSnapshot with the owner's snapshotArn failed validation
because only the caller's account was accepted. The snapshot and its policy were also
checked before the service lock was taken, so a deletion, expiry or policy revocation
could land between the check and the restore. The check now runs under the lock.

* fix(redshift-serverless): evaluate a shared snapshot's policy through a ResourcePolicyProvider (#7801)

Move the snapshot policy check out of the service and into IAM enforcement, as SQS, SNS and S3 do:

- RedshiftServerlessResourcePolicyProvider supplies the snapshot's policy and the account in its ARN.
  A statement with no Resource, as in AWS's own PutResourcePolicy example, applies to the snapshot.
- redshift-serverless leaves NOT_COVERED: namespaces, workgroups and snapshots are found by name through
  StoredResourceArns, and RestoreFromSnapshot and GetSnapshot name the owner's snapshot when ownerAccount is set.
- Drop RedshiftServerlessSharedSnapshots and the snapshot-taking restoreFromSharedSnapshot overload.

* fix(redshift-serverless): derive snapshot account from the generator and find endpoint access ARNs (#7801)

Take ownerAccount as an account member in the request-resources generator and honor
account on found resources, replacing the hand-written CORRECTIONS entries and the
two-name branch in find. Answer endpointAccess in find. Share one call in
handleRestoreFromSnapshot.

* fix: derive account members from service models and reuse endpoint lookup
2026-11-11 11:57:28 -04:00
Mario Toffia 013e9b7c2e fix(cognito): answer CORS on the OAuth token, revoke and userInfo endpoints (#8027) 2026-11-11 11:54:44 -04:00
Jimmy Liu Jia d0d0e0eef8 fix(codedeploy): preserve deployment group creation tags (#8025) 2026-11-11 11:08:16 -04:00