Commit Graph
3908 Commits
Author SHA1 Message Date
Aniket Shukla ed77a1d4ee fix(eventbridge): paginate ListConnections results (#6709) 2026-10-26 23:45:30 -04:00
Hector Ventura 258994c1b9 feat(ui): serve the Console Contract v2 manifest and pass its URL to the console (#6711)
* feat(ui): serve the Console Contract v2 manifest and pass its URL to the console

/_floci/info and /_localstack/info now carry manifest_version, console_contract, cloud, endpoint, health_url, tls, services, defaults and ui, keeping their existing keys. FlociUiManager injects FLOCI_INFO_URL so the console can read it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test(ui): drop the DisplayName from the manifest test

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-26 23:42:00 -04:00
Hector Ventura 78278f4a04 refactor(rds): read and check ARNs through AwsArnUtils (#6485) 2026-10-26 23:34:32 -04:00
TATSUNO “Taz” Yasuhiro b0cd70401b feat(iam): check lambda:PassNetworkConnector from a table generated from the Service Reference (#6699)
* feat(lambdaweb): check lambda:PassNetworkConnector as AWS does

A revision that sets egressNetworkConnectorArn needs
lambda:PassNetworkConnector on the connector version ARN as given.
Lambda checks it after the connector ARN checks and before it looks
the connector up.

A refusal names the first policy type that refuses, in the order
identity policies, permissions boundary, session policy. An explicit
deny in a managed policy or a boundary also names that policy's ARN.

* fix(lambdaweb): apply service control policies to the account root when passing a connector

* fix(lambdaweb): name the managed policy that denies a session token caller

* feat(iam): check lambda:PassNetworkConnector from a generated table

Move the check out of Lambda Web into the IAM enforcement filter, where
iam:PassRole is checked. tools/aws/regen_iam_passed_network_connectors.py
joins AWS's Service Reference and botocore's models into
src/main/resources/aws/iam-passed-network-connectors.json, and the filter
reads it for Web Functions, MicroVM images and MicroVMs.

A MicroVM request that names no egress connector, or an empty list, passes
the Lambda-managed INTERNET_EGRESS connector, and RunMicrovm with no ingress
connector passes HTTP_INGRESS, as AWS checks them. AppSync's data source
operations are listed too, but botocore's model has no member for their
connector, so they are not read.

The refusal text now comes from AccessDeniedMessages, which
LambdaTaskAuthorizer and GetStackOutputRoleAuthorizer use as well.
2026-10-26 23:26:25 -04:00
lex00 8a3d769c70 refactor(route53): use DomainNames.isWithin for the record set zone check (#6712) 2026-10-26 23:24:34 -04:00
lex00 9e14ffe92a fix(ec2): keep Ipv6CidrBlock and IcmpTypeCode on network ACL entries (#6680) 2026-10-26 23:24:00 -04:00
Priamo Germosen 454d7b6ebd feat(codeartifact): add ListPackages for every format (#6622)
Lists every package a repository holds across all five formats, with
each package's origin-control restrictions, filterable by format,
namespace prefix, package-name prefix, and publish/upstream
restriction. generic is enumerated by scanning stored package-version
and origin-config records repository-wide; each container-backed
format gets a new RepositorySidecarManager#listPackages primitive,
confirmed live against each real sidecar: Reposilite has no
list-everything endpoint, so Maven walks its directory tree, peeking
one representative child per directory to tell a group/artifact
directory apart from a plain namespace segment (both look identical
one level up); Verdaccio's /-/all, pypiserver's root simple index, and
BaGetter's Search resource (pressed into service for this admin
listing only, not the native NuGet protocol) answer directly.
2026-10-26 21:52:20 -05:00
Priamo Germosen 0410a2b4ea fix(iam): check PutEvents on each entry's event bus (#6704)
PutEvents was checked on `*`: the request-resources table gave it no
resources, as its bus is a field of each entry, which no rule read. A
policy allowing or denying events:PutEvents on one event bus therefore
did not hold for publishing.

Each entry's EventBusName is "the name or ARN of the event bus to
receive the event", and "if you omit this, the default event bus is
used". Bus policies grant events:PutEvents on `event-bus/<name>`. The
EventBridge User Guide checks events:PutEvents against "the bus, once
per entry in the request", and says "Publishing is authorized against
the bus ARN for every entry in the request. If one entry fails an
authorization condition, EventBridge denies the whole request." It says
so in its section on the Custom Event Bus, which keeps the events: IAM
namespace of the Classic one; nothing in the guide says otherwise for a
Classic bus, whose API model lists AccessDeniedException among the error
codes of an entry without saying when.

The table now reads PutEvents' `Entries[].EventBusName`, a field of each
of a list's structures, one resource for each entry:

- The generator takes a correction filling a variable from such a field,
  and finds a field whose pattern takes an ARN before a name inside a
  list's structures, as it does a top-level member, so the field gets
  `arnOf` from botocore.
- The loader reads `Name[].Field` in `fill`, and in `absent` and `arnOf`
  when it fills a variable.
- The reader gives one value for each entry, the `absent` value for an
  entry that names no bus, gives a null or a blank, as the handler's
  `asText(null)` does, and none for no entries, which stay on `*`. Each
  value that is an ARN puts its own entry's bus in that ARN's account and
  Region, checked as given and as the caller's, which the handler
  publishes to; until now the first ARN a request gave set the account
  and Region of every value.

The filter checks every resource, so one entry for a bus the caller may
not publish to refuses the whole request, as the guide gives it.

Not in this change: the events:source and events:detail-type condition
keys (Floci supplies neither), EndpointId (the handler ignores it), and
PutPartnerEvents, which stays on `*`.

The upstream drift check on a pull request now verifies only the
vendored IAM files the pull request changes, each with its generator,
its tests and the modules that generator imports. It verified all six
files whichever one a pull request touched, so this change, which
touches only the table of the resources requests name, failed on the
service namespace list, which AWS's index stopped matching when it
dropped `codestar`: drift in a file the change leaves alone. The
pull request's job passes the paths its merge commit changes to
`make iam-data-verify CHANGED=...`, which names each check it skips;
the weekly and manual runs, and a diff that cannot be read, still
check every file, so the namespace list's drift is reported there.
2026-10-26 21:52:09 -05:00
Priamo Germosen 5c9eb3eb30 feat(emr-serverless): send Spark driver output to CloudWatch Logs (#6703)
With CloudWatch logging enabled on a job run in the docker runner mode,
its Spark driver's standard output and error now go line by line, while
it runs, to Floci's CloudWatch Logs, as well as to Floci's log.

- Which configuration: the run's cloudWatchLoggingConfiguration, or
  else the application's; the user guide merges them by configuration
  type, and "enabled": false at the run removes it.
- Where: the log group logGroupName, /aws/emr-serverless by default,
  and the log streams <logStreamNamePrefix>/applications/<applicationId>
  /jobs/<jobRunId>/SPARK_DRIVER/stdout and .../stderr, with attempts/1/
  before SPARK_DRIVER for a retried run on 7.1.0 or later, as for S3.
  The guide gives the default group and the stream up to its worker
  type; the stdout and stderr streams under it are as Dagster's EMR
  Serverless client reads them, and Airflow's operator builds the same
  prefix. Group and streams are created as needed, in the run's account
  and Region.
- What: the driver's stdout and stderr, "By default, EMR Serverless
  publishes only the driver stdout and stderr logs". A logTypes that
  names some types sends only the driver's it names, so none of them
  when it names only SPARK_EXECUTOR: the API reference's logTypes is
  "The types of logs that you want to publish to CloudWatch".

ContainerLogStreamer gets attachByStreamForAccount, which sends a
container's standard output and error to log streams of their own; its
reassembly callback now keeps the stream each line came from. The
shared Spark runner uses it when a job carries a CloudWatch destination.
2026-10-26 21:51:57 -05:00
TATSUNO “Taz” Yasuhiro 0cc4984356 fix(dynamodb): bill each BatchGetItem key like a GetItem (#6708)
* fix(dynamodb): bill each BatchGetItem key like a GetItem

DynamoDB bills each key of a BatchGetItem as a GetItem of the whole item. That is half a
unit per 4KB, doubled for a consistent read, with the minimum charged for a key that finds
nothing. A projection does not lower it, and a vector attribute counts at its billed size.

* fix(dynamodb): size BatchGetItem items only when capacity is requested
2026-10-26 22:05:20 -04:00
Aniket Shukla 825564a3d0 fix(apigatewayv2): include authorizer identity sources (#6694) 2026-10-26 21:46:13 -04:00
Jimmy Liu Jia a30e484dae fix(lambda): paginate ListFunctions responses (#6700)
* fix(lambda): paginate ListFunctions responses

* test(lambda): isolate ListFunctions pagination fixture

* refactor(lambda): share signed list pagination
2026-10-26 21:36:27 -04:00
Vũ Thế Huy e9e2b38da6 feat(redshift): add event history and DescribeEvents (#6663) 2026-10-26 21:25:14 -04:00
Jimmy Liu Jia 15e2c98957 fix(ram): advance share update timestamps within one clock tick (#6674)
* fix(ram): advance share update timestamps within one clock tick

* fix(ram): preserve equal create timestamps

* fix(ram): serialize share timestamp updates
2026-10-26 20:56:02 -04:00
berce 79e47cd7fc fix(ec2): seed the default network before marking the scope seeded (#6637)
* fix(ec2): seed the default network before marking the scope seeded

ensureDefaultResources added the account/region to the seeded set before seeding, so a concurrent first call returned at once and read a partial or empty default VPC. seed under a lock and mark the scope afterwards.

* test(ec2): check the seed race with ParkingStore instead of a fixed wait

The first call parks in its first subnet write and the test waits until the second call is blocked on the seed lock, so it fails at once on the old code and no longer sleeps two seconds.
2026-10-26 20:31:56 -04:00
Priamo Germosen 0ec28aee68 feat(iam): read a Query list's constraints from the model (#6625)
The Query walk the managed-policy family reads its constraints through read
scalars only, and refused an operation whose input carries a list when the
vendored file loaded. It reads a list now, and a structure, which is what the
rest of this track is gated on: 34 of IAM's 180 operations carry a list or a
map, and 6 of STS's 11 do.

A list arrives numbered under its own name, Audience.member.1 or the bare
Audience.1, and a member of a list of structures carries its fields under that
prefix, as Tags.member.1.Key does. Each is named in a message the way this
package already names one, filter.1.member and tags.1.member.key, under the
index the request spelled rather than the position the member sits at, which is
what #6478 settled. The count is held to the list's own bounds with the value
left out of the message, which is the form checkListLength and the audience
check both already answer: quoting it would echo every member of the list back.
A list of no members is how an absent list arrives on this protocol, so a
required one reads as null rather than as a list breaking a minimum of 1, and
only a minimum above 1 is reachable at all. A structure member arrives as
TaskPolicyArn.Arn and is named taskPolicyArn.arn, and a request naming none of
its fields is a request without the member.

GetAccountAuthorizationDetails is the operation this wave opts in, and the one
where the model adds refusals rather than rewording an answer already given:
the handler reads none of its three declared members, so a Filter outside the
model's enum, a MaxItems outside 1 to 1000 and a Marker breaking its length or
its pattern are all answered with a 200 today. They are a 400 ValidationError
now, which is the ordering #6402 settled for this package.

A map is still refused when the file loads, and so is anything nested deeper
than a list of structures. The refusal is the point rather than a gap: this
package answers a map against the whole map today, Map keys must satisfy
constraint on PutAccountProperties, where the protocol numbers a map's entries
as Properties.entry.N.key, and no source here says which of the two AWS
answers. Reading one would reword a merged answer on the strength of a guess.

The reader the walk needs went into AwsQueryLists rather than into a third
copy. That file already reads a list's values, and StsQueryHandler holds a
private copy that captures the prefix and the index for the same reason this
one does; the STS wave is where that copy goes.

A number too large for a long is a number all the same, which the range check
reads as one now. It compared through a long before, so a MaxItems of
9223372036854775808 failed to parse, read as no number at all and reached the
operation past a maximum of 1000. The bound it breaks is one that fits in a
long either way, so the comparison carries no width of its own, and the value is
written as the number reads rather than as the request spelled it, a leading
plus or zero gone, which is what a parsed value already answered.

Seven unit tests cover the new forms, two of them on the reader, which is where
one of them found that a key naming its own member read as a member numbered
after it: the index is a number or the key is not a member's. Four wire tests
cover the operation. Removing the list branch fails four of the six list and
structure tests and two of the four wire tests: the two that stay green are
MaxItems and Marker, scalars the walk already read, so they prove the operation
was opted in rather than the walk.
2026-10-26 19:17:09 -05:00
Priamo Germosen 7c0ee92480 fix(iam): refuse SNS requests with AuthorizationError (#6621)
Under IAM enforcement a refused SNS request answered `AccessDenied`, the
code Floci gives every Query service. SNS models no such error. Every
one of its 42 operations lists `AuthorizationError`, HTTP 403, a sender
fault ("Indicates that the user has been denied access to the requested
resource"), which SDKs raise as `AuthorizationErrorException`; the SNS
Developer Guide's own sample reads that code as an IAM permission
failure ("Authorization error listing topics - check IAM permissions").
An SDK caller catching `AuthorizationErrorException` therefore missed
Floci's refusal, which surfaced as a bare `SnsException`.

A Query denial now takes its code from the service that serves the
request: `AuthorizationError` for SNS, whichever action is denied (a
role it is passed as much as its own action), and `AccessDenied` for
every other Query service, as before. The status, the `Sender` type and
the message are unchanged.

Not in this change: Floci's SNS JSON surface (`SNS_20100331.*`
targets), which botocore does not model, keeps `AccessDeniedException`.
2026-10-26 19:16:56 -05:00
Priamo Germosen 0a47ddd5e4 feat(emr,emr-serverless): write Spark driver logs to S3 (#6620)
In the docker runner mode a Spark driver's output went only to Floci's
log. Once a driver ends, the shared runner now reads its standard output
and error from Docker and puts them, gzipped, into Floci's S3 as
stdout.gz and stderr.gz in the run's log folder, while the container is
still the run's. A driver a cancel or its timeout ended is stopped
first, through a new ContainerLifecycleManager.stop that leaves the
container in place, so it changes nothing more while its output is read
and the logs hold all it wrote; a driver Floci's teardown took writes
nothing. Logs that cannot be written leave the run as it ended.

- EMR steps: under the cluster's LogUri, at
  <LogUri>/<cluster-id>/steps/<step-id>/ (Management Guide, "Log
  locations"); without a LogUri "logs are not created". An s3n:// or
  s3a:// LogUri names the same bucket.
- EMR Serverless job runs: under the run's s3MonitoringConfiguration
  logUri, or else the application's (the user guide merges them by
  configuration type, and an empty one at the run removes it), at
  applications/<applicationId>/jobs/<jobRunId>/SPARK_DRIVER/, with
  attempts/1/ before SPARK_DRIVER/ for a STREAMING run or a BATCH run
  whose retry policy allows more than one attempt, on 7.1.0 or later.

FailureDetails gets no LogFile: the Management Guide ties it to a root
cause EMR identifies, and Floci's Reason is always "Unknown Error".

core.common.S3Uri splits the folder's s3:// URI into bucket and key.
2026-10-26 19:16:40 -05:00
Aniket Shukla 13289b0aef fix(athena): paginate data catalog summaries (#6679) 2026-10-26 20:12:23 -04:00
TATSUNO “Taz” Yasuhiro 3867b5feaa fix(dynamodb): bill a vector attribute at four bytes per dimension (#6688)
* fix(dynamodb): bill a vector attribute at four bytes per dimension

DynamoDB bills a read or write of a base table item with each attribute
a vector index reads at its name plus four bytes per dimension, whatever
numbers it holds. That covers every single-item write, transactions,
batch writes, GetItem, Query, Scan, PartiQL and TransactGetItems. A GSI
copy of the item, the 400KB limit and the 1 MB page of a Query or Scan
still count the numbers. Floci billed the numbers everywhere.

* fix(dynamodb): bill the vector attribute once its index is active, whatever it holds

DynamoDB bills the attribute at its name plus four bytes per dimension even when an item
written before UpdateTable added the index holds something other than a vector there. While
the index is still CREATING, the item is billed at its stored size.

* chore(dynamodb): write the type of the GetItem billed size
2026-10-26 20:10:20 -04:00
Jackson Price 322a6a0977 fix(logs): refuse FilterLogEvents requests that name no log group (#6693) 2026-10-26 19:56:51 -04:00
David d10db3ce9b feat(ecr): repository creation templates (#5955)
* feat(ecr): repository creation templates

CreateRepositoryCreationTemplate, DescribeRepositoryCreationTemplates,
UpdateRepositoryCreationTemplate and DeleteRepositoryCreationTemplate store
templates per account and Region, keyed by prefix, with each field checked
against the service model. An update replaces the fields it sets, and an
empty string or list clears one. Templates are recorded, not applied, as
nothing in Floci creates repositories through replication, pull through
cache or create-on-push.

Closes #5804

* refactor(ecr): check repository creation templates against the vendored model

The four template actions join the registry settings in
ecr-request-shapes.json, so the handler checks their requests against the ECR
model's types, lengths, patterns and enums and answers in ECR's
"failed to satisfy constraint" form. The handwritten copies of those rules
go. What the model can't state stays in the service: appliedFor naming at
least one value, and policy text being a JSON object.

The model gives imageTagMutabilityExclusionFilters at least one entry, so an
update sending an empty list is now refused rather than clearing the filters.
Terraform omits the member when the filters are removed and moves to a mode
without exclusions, so an update that leaves the template in such a mode now
drops the filters. Before, they stayed, and every plan showed them again.

* fix(ecr): lock creation template writes, share one JSON object check and fold a trailing slash

Create, update and delete each read a template and then wrote it without a
lock, so two creates of one prefix could both succeed and an update racing a
delete wrote the deleted template back. They now take the registry lock the
registry settings use. The template policies and the registry policy share one
JSON object check that also refuses text after the object, such as {}{}.
ECR assumes a / after every prefix, so prod and prod/ are now one template.
The test helper imports Executable.

* fix(ecr): describe each template once when prefixes differ only by a slash

Describe removed duplicate prefixes before folding the trailing slash, so
prefixes prod and prod/ returned the template twice, and with maxResults 1 a
token followed by an empty page. It now removes duplicates by template key.
The lock tests use the shared testing ParkingStore instead of their own copy.
2026-10-26 19:36:42 -04:00
Andre Kurait 6ff4700a22 fix(dynamodb): enforce the aggregate batch write limit (#6633) 2026-10-26 19:36:27 -04:00
Mario Toffia c6505c9144 fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things (#6657)
* fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things

UpdateThing replaced the attributes with whatever the request carried, so a
merge update dropped the stored attributes and a type-only update wiped them.
It now merges when attributePayload.merge is true, removes an attribute given
an empty value, leaves the attributes alone when the request has none, sets or
removes the thing type, and rejects a missing or deprecated type and a
removeThingType that also names a type. DeleteThing now honours
expectedVersion, and a stale version reports AWS's message.

Closes floci-io/floci#6655

* fix(iot): serialize UpdateThing and DeleteThing, reject a malformed thingTypeName

A merge is a read-modify-write and expectedVersion is a compare-and-set,
so both now run under one thing write lock. An empty or malformed
thingTypeName on UpdateThing is an InvalidRequestException, as in AWS,
instead of being treated as absent.

* test(iot): race versioned thing updates and deletes, rerun the SDK test on AWS

A race test holds the thing write lock to one winner per expected
version. On AWS the SDK test borrows an active test thing type, as
fleetIndexSearch does, since a deprecated type cannot be deleted for
five minutes and a rerun would fail.

* fix(iot): answer a malformed thingTypeName with AWS's validation message

UpdateThing now builds the refusal with SmithyValidationErrors, listing
the length violation before the pattern one, as measured on AWS.
2026-10-26 18:58:11 -04:00
lex00 1b7bb80f36 fix(route53): reject record sets outside the hosted zone (#6412)
* fix(route53): reject record sets outside the hosted zone

ChangeResourceRecordSets fails with InvalidChangeBatch when a record set's
name is neither the zone's name nor a name under it, comparing names
without regard to case or a trailing dot. Wildcard names under the zone
still pass.

* fix(route53): match zone names with ASCII folding and accept any name in the root zone

The hosted-zone check uses normalizeRecordName, the same ASCII-only folding
as record identity, so the Kelvin sign in a label stays distinct from the
letter k. The root zone, named with a single dot, contains every record name.
2026-10-26 18:03:21 -04:00
James McMahon 1bf019f89a fix(ecs): honour privileged EC2 task containers (#6659) 2026-10-26 17:38:28 -04:00
Aniket Shukla 95960f80e8 fix(codedeploy): honor ListApplications continuation tokens (#6678) 2026-10-26 17:27:41 -04:00
Jackson Price 9fd0578181 fix(elb): keep Classic load balancer health checks per account (#6666)
* fix(elb): keep Classic health checks apart between accounts

The Classic health checker kept its instance states and its probe timer
under the region and the load balancer name. A Classic name is unique
only within one account, so when two accounts each had a load balancer
called web they shared one entry. Creating the second web replaced the
first one's periodic check with its own, and deleting it removed the
first account's instance states too: those instances then reported
OutOfService with reason ELB ("Instance registration is still in
progress") and were no longer checked.

The key now includes the load balancer's account, and the checker's
methods take the load balancer itself instead of a region and a name,
so the account always comes with it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore every account's Classic load balancers at startup

Startup runs outside any request, where the storage-backed map of
Classic load balancers sees only the default account. Restoring through
it restarted health checks for the default account's load balancers
alone: after a restart, the instances registered with another account's
load balancers reported OutOfService with reason ELB and were never
checked. Those accounts' region maps also stayed the plain maps read
from disk, although the name check in CreateLoadBalancer and the
certificate scan rely on concurrent ones, and a load balancer stored
with the old fixed hosted zone kept it unless the default account owned
it.

Startup now walks the stored region maps of every account: it makes
them concurrent, gives each load balancer its region's hosted zone, and
starts its health checks. A load balancer stored before load balancers
recorded their account takes the account it is stored under, so its
health state and instance lookups belong to that account.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore the default account's Classic load balancers by their own keys

The every-account restore read the default account from a scan of the
whole store as well, and that scan recognizes only 12-digit account
prefixes. The default account id is configurable, through
FLOCI_DEFAULT_ACCOUNT_ID, and need not be 12 digits. With one such as
local, every restart read the key local/us-west-2 as a region of that
name: the default account's load balancers lost their hosted zone, their
region maps stayed plain maps, and each restart wrote nested copies of
the store that a delete never reached.

The region maps that the storage-backed map shows, which at startup are
the default account's, are read through it again, as they were before
the every-account restore, and written back under their own keys. The
scan now supplies only the other accounts' maps. The javadoc no longer
compares this restore with ELBv2's, which still covers the default
account only.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): run the Classic account isolation checks every second

The account isolation tests set their health check through
ConfigureHealthCheck, whose 5-second minimum interval made the two tests
take about 20 seconds. They now set a check every second on the stored
load balancer and re-arm the checker directly, and take about 4
seconds. Both still fail on the commit before the per-account key.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(elb): restore each Classic region map under the account in its key

The startup restore read the default account through the storage-backed
map, which shows the account of the current request, and every other
account from a scan that recognizes only 12-digit account prefixes.
Neither holds in general. The service is created on its first use, and
that use can come inside another account's request: an IAM
DeleteServerCertificate reaches it even while Classic ELB is disabled
and its lifecycle restore never runs. Account ids need not be 12 digits
either: FLOCI_DEFAULT_ACCOUNT_ID is free-form, and AssumeRole takes the
account from the role ARN. In those cases the restore again nested
copies of a region map and cleared its hosted zone, or left another
account's load balancers unrestored.

Startup now reads every region map by its raw stored key and takes the
account and the region from it. A region never contains a slash, so the
account is everything before the last one.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): check which load balancer each restored account holds

The restore test for region maps read by their stored keys checked each
account's keys, map type, hosted zone and health checks, but not which
load balancer its map held. A restore that wrote every map back under
the account of the current request still passed, with one account left
holding another account's load balancer. The test now checks that each
account's stored map holds that account's own load balancer, and that
write-back fails it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): run the Classic isolation checks without waiting on timers

The account isolation tests waited on the real one-second health check
timer, so the class took about 5.6 seconds, 3 of them in the second
case. The checker now keeps the load balancer each periodic check
probes next to its timer, and a package-private runArmedChecks() runs
one tick of every armed check at once. The tests set an interval no
timer reaches during a test, settle each check in one probe, and run
the rounds themselves. The class now takes about 1.8 seconds, most of
it the first case's setup, and the timers keep their schedule.

Running what the armed timers would run, rather than probing one load
balancer directly, keeps the second case meaningful: it is about
another account's balancer taking over the periodic check. With the
account left out of the health checker's key, both cases still fail.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(elb): make the second Classic isolation case independent of rounds

The case where another account creates a load balancer of the same name
caught a health checker keyed without the account only because it ran
exactly one round: the other account's default TCP:80 check needs two
failures, so a second round would have let it report OutOfService as
well. The case now also checks that the instance recovers once its
backend answers 200 again, which only the first account's own check can
report.

The helper that registers the instance no longer runs a round of its
own. The probe that registration schedules already settles a check with
thresholds of one, and a second probe could still be running when the
case moved on. Each periodic check now stores the tick its timer runs,
and runArmedChecks runs that same tick, so the two cannot drift apart.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* refactor(elb): create the Classic load balancer store in the constructor

The Classic service created its load balancer store and the map over it
in initializeStorage, so neither field could be final, as AGENTS.md asks
of service fields. Both are now created in the constructor, as
CloudFormationService creates its stores, and are final; without a
StorageFactory the map is a plain in-memory map, as before.
initializeStorage keeps the conversion of region maps read from disk, so
the startup order is unchanged: the store is created and loaded during
the bean's construction either way, and nothing in that step calls
another bean. The StorageFactory field, read only there, is removed.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 17:23:04 -04:00
Jackson Price f3f8b42200 feat(cloudformation): support AWS::Route53::RecordSetGroup (#6676)
A RecordSetGroup writes all its record sets into one hosted zone in a
single ChangeResourceRecordSets batch, so a record set that cannot be
written, such as a name another owner already holds, leaves the zone
unchanged and fails the stack. Each record set keeps what a RecordSet
keeps, including the routing-policy fields SetIdentifier, Weight,
Region, Failover and HealthCheckId; entries an Fn::If resolves to
AWS::NoValue are dropped, and two record sets with one name, type and
set identifier are refused. Ref returns the group's logical ID and
Fn::GetAtt Id the change ID that GetChange reads, as AWS documents.

The zone comes from the group's HostedZoneId or HostedZoneName, or from
its record sets when the group names neither. A record set that repeats
the group's HostedZoneId is refused, as AWS documents, and so is one
that names another zone.

An update in the same zone deletes the records the group wrote and
creates the new ones in one batch. HostedZoneId and HostedZoneName are
create-only, so a change set reports a zone change as a replacement:
the records are written into the new zone, and the old ones are deleted
once the update commits, or kept under UpdateReplacePolicy: Retain. A
failed update puts back the records the group had; after a zone change
the group first points at its old records again, then deletes the new
zone's. If that delete fails, ContinueUpdateRollback retries it and
DeleteStack deletes those records while the rollback is unfinished;
anything else leaves them in their zone, since Route 53 cannot tell
them apart from an identical record another writer puts there later.
Deletes name the values the group wrote, so a record changed outside
the stack fails the delete rather than being removed.

The docs say what a record set group's failed rollback leaves behind.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 17:10:49 -04:00
Jimmy Liu Jia 4d0dfe9919 fix(apigateway): support integration connection patches (#6645)
* fix(apigateway): support integration connection patches

* test(apigateway): cover connection patches through AWS SDK

* fix(apigateway): accept V2 VPC links in integration patches

* fix(apigateway): resolve V2 VPC links during REST execution

* fix(apigateway): resolve VPC link stage variables at execution

* fix(apigateway): share VPC link stage variable pattern
2026-10-26 17:05:35 -04:00
Niels Kootstra 2fd74eaf08 fix(s3): escape a carriage return in XML responses so a key keeps it (#6598)
* fix(s3): escape a carriage return in XML responses so a key keeps it

* test(s3): share one path-style S3 client between the S3 tests
2026-10-26 16:50:11 -04:00
Jackson Price b280a7764a fix(appconfig): keep environment monitors and report deployment sources (#6665)
CreateEnvironment dropped the Monitors it was sent, and StartDeployment
and GetDeployment never reported the deployed profile's name or
location. AWS documents all three on these operations.

- CreateEnvironment stores Monitors and environment reads return them.
  They are checked against AWS's limits (at most five; AlarmArn of 1 to
  2048 characters; AlarmRoleArn an IAM role ARN in any partition) and
  refused with BadRequestException before anything is stored. An
  environment created without monitors returns no Monitors member, as
  AWS's own example shows.
- StartDeployment records the profile's ConfigurationName and
  ConfigurationLocationUri, and GetDeployment returns them.
- Records stored by earlier builds load unchanged: the new members are
  omitted when absent, so their responses stay byte-identical.

A configuration profile created without Type still reports none: AWS
documents no default, and its CreateConfigurationProfile example returns
a null Type.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 14:24:27 -04:00
Aniket Shukla 4506645d0f fix(servicecatalog): paginate portfolio listings (#6631)
* fix(servicecatalog): paginate portfolio listings

* refactor(servicecatalog): reuse shared pagination validation
2026-10-26 14:22:00 -04:00
Mohith 86d9115eba perf(dynamodb): query only the requested partition (#6668)
Use bounded map views for base-table queries while preserving index scans, ordering, and pagination.

Fixes #6667
2026-10-26 14:11:17 -04:00
Andre Kurait 07597598b6 fix(cloudformation): relocate SAM schemes without auth defaults (#6656)
* fix(cloudformation): relocate SAM schemes without auth defaults

Follow the separate postprocessing request in upstream #6638. Relocate declared OpenAPI security schemes independently of Auth defaults, preserving Swagger and operation requirements.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(sam): centralize OpenAPI security scheme relocation

Keep the defaults helper responsible only for generating AWS_IAM and api_key definitions. Relocate the security scheme map exclusively in the shared final OpenAPI phase, including documents without Auth defaults.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-26 13:49:34 -04:00
Jimmy Liu Jia b89b6da1a4 fix(sagemaker): honor ListModels sorting and pagination (#6643)
* fix(sagemaker): honor ListModels sort parameters

* fix(sagemaker): preserve ListModels pagination cursors

* test(sagemaker): verify ListModels pagination through AWS SDK

* fix(sagemaker): report invalid ListModels sort enums
2026-10-26 13:44:51 -04:00
berce c4ad788e62 fix(bedrock): list guardrails in the tagging api and route its writes (#6646)
* fix(bedrock): list guardrails in the tagging api and route its writes

guardrails were not a ResourceProvider, so GetResources with bedrock:guardrail came back empty, and TagResources had no bedrock handler to forward to. list the draft of each guardrail with its own tags and add a tagging-api-only handler that calls the existing tag methods.

* test(bedrock): cover guardrail discovery and tagging writes with the sdk
2026-10-26 12:05:47 -04:00
Jackson Price 8b13c75fa2 fix(redshift): stay queued for backend ownership until the deadline (#6634)
* fix(redshift): stay queued for backend ownership until the deadline

runWithBackendOwned waited for the fair backend lock 200 ms at a time,
the length of the pump's idle read. A wait that ran out while a read
was in progress left the queue, and the pump takes the lock back as
soon as it releases it, so the request could miss every handoff until
the 2 s deadline.

Every Simple Query waits for ownership while the Spectrum interceptor
inspects it. When the handoffs were missed, the query stalled for the
full 2 s, and one over an external table then failed. External-table
preparation on Parse and Bind failed with "Unable to prepare external
query", a Simple Query S3 COPY or UNLOAD went to PostgreSQL
unintercepted and failed there, and closing an abandoned Spectrum
cursor kept its temp table until the session ended.

The wait now spans the rest of the deadline in one attempt, as the
Extended Query Execute paths already do, so the request keeps its
place and takes the lock at the pump's next release. The idle check,
the mid-frame backoff and the deadline itself are unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* refactor(redshift): drop the unreachable retry after a timed-out lock wait

runWithBackendOwned now waits for the backend lock once, for the rest
of the deadline. A timed tryLock returns false only after that whole
budget has elapsed, so the deadline check that followed always held
and its continue could not run. Return false straight away, with the
same warning; behaviour is unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(redshift): hand the backend lock to the bridge through a constructor

RedshiftBackendOwnershipTest replaced the bridge's private final
backendLock by reflection, which later JDKs warn about. The public
constructors now pass a new fair lock to a private constructor, and a
package-private one for tests takes the lock with no services, so the
test builds its bridge directly. Production bridges get the same fair
lock as before.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(redshift): run the ownership control test on a short budget

The control case in RedshiftBackendOwnershipTest, where the pump never
releases the lock, sat out the real 2 s ownership deadline on every
run. The test constructor now also takes the runWithBackendOwned
budget: the control case uses 100 ms, and the handoff case keeps the
production 2 s. Production bridges still get PUMP_PARK_WAIT_MS, now
package-private so the test can name it.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 11:48:51 -04:00
Mario Toffia c81cf8a630 fix(iot): deliver data-plane publishes to MQTT subscribers (#6630)
* fix(iot): deliver data-plane publishes to MQTT subscribers

A message sent with the IoT Data Publish API stored its retained copy
and ran the topic rules, but never reached a connected MQTT client. The
data-plane publish now goes through the broker fan-out after the rules,
as an MQTT publish does.

The fan-out delivers at the lower of the message and subscription QoS,
with RETAIN 0, and a retained message sent on subscribe carries RETAIN 1
at the lower of its stored and the subscription QoS, as measured on AWS
IoT Core. Publish refuses a qos other than 0 or 1 with AWS's
InvalidRequestException messages.

Closes floci-io/floci#6627

* fix(iot): allocate packet identifiers for broker publishes

Vert.x draws the packet identifier of an outbound publish from an
unsynchronized per-endpoint counter. With QoS 1 delivery, two threads
fanning out to one client could send two unacknowledged copies under the
same identifier. The broker now allocates them from one atomic counter.

A retained message stored with a negative qos, which Publish accepted
before it validated qos, is sent on subscribe at QoS 0 instead of
aborting the replay.

* fix(iot): keep MQTT packet identifiers per session

One broker-wide counter let copies sent to other clients, QoS 0 included,
wrap a client's identifiers while its QoS 1 copy was unacknowledged. Each
session now draws QoS 1 identifiers from its own counter, and a QoS 0
copy carries none.

* test(iot): share the IoT Data client builder

Both IoT Data integration tests now build their IotDataPlaneClient
through IotDataRequests.iotDataClient(accessKey), as review asked. The
IoT limitations also list that a QoS 1 copy is never retried and has no
in-flight limit, where AWS holds further copies at 100 unacknowledged.

* test(iot): drive the packet identifier isolation test at QoS 1

QoS 0 copies carry no packet identifier, so the other client's 65,534
copies must be QoS 1 for the test to catch a counter shared by every
client. The IoT limitations also say that a data-plane Publish reaches
subscribers in every account and region, as the broker has none.
2026-10-26 11:43:50 -04:00
Vũ Thế Huy f184cce726 feat(redshift): execute automated snapshot schedules (#6536)
* feat(redshift): execute automated snapshot schedules

* fix(redshift): address automated snapshot review findings

Flush snapshot metadata before deleting an expired dump, pause the
snapshot scheduler across emulator reset, run retention even when the
next dump fails, and remove checkpoints of deleted clusters.

* fix(redshift): retake an automated snapshot whose metadata was lost

The checkpoint is a separate store, so it can persist while the snapshot
metadata never reached disk. Skip a completed occurrence only when its
snapshot still exists.

* test(redshift): restore the automated snapshot on the shared interceptor cluster

Run the Docker restore scenario in RedshiftInterceptorIntegrationTest
against the cluster it already starts, so only the restore pays for a
container, and drop the hand-rolled Docker probe.
2026-10-26 11:42:07 -04:00
Jackson Price 986117a45c fix(ec2): keep key pair names unique under concurrent requests (#6635)
* fix(ec2): keep key pair names unique under concurrent requests

CreateKeyPair and ImportKeyPair checked that a name was free and stored
the new key pair as two separate steps, so two requests for one name at
the same moment could both pass the check and both store a key pair.
Both got a key pair back, DescribeKeyPairs listed the name twice, and
RunInstances injected whichever record it found first, so the other
caller's private key did not open the instance. CreateKeyPair generates
its key between the two steps, which keeps that window open for as long
as key generation takes.

Both actions now store through one method that checks the name again
and writes under the EC2 service's striped lock for the region and
name, so the second request is refused with InvalidKeyPair.Duplicate
and the same message as before. The first check stays where it was, so
a single request is answered as before, and a taken name is still
refused before a key is generated for it.

Follow-up to the review of #6112.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): keep a tag write from restoring a deleted key pair

A CreateTags on a key pair reads the record and writes it back with its
new tags while holding the key pair's lock, but DeleteKeyPair deleted
without that lock. A delete landing between the read and the write was
undone: the key pair came back, and if a CreateKeyPair had taken the
freed name in between, the name then had two key pairs.

DeleteKeyPair now deletes each matching key pair under the lock tag
writes take on it, as DeleteEgressOnlyInternetGateway does, so a tag
write either finishes before the delete or finds the key pair gone.
The EC2 docs now say what CreateKeyPair and ImportKeyPair do with a
taken name rather than promising one key pair per name outright.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): pin where the key pair race tests wait, and clean up the SDK test

The race tests now let the held write go early only when the waiting
request is blocked in storeNewKeyPair or deleteKeyPair on a monitor the
held request owns, and otherwise wait for that request to finish, so a
change that made it wait anywhere else fails the test instead of
quietly skipping the check under the lock.

The SDK test waits up to 60 s for its requests to finish before it
deletes the name, so a slow request is not left to store a key pair
after the cleanup, and it checks the refused requests' error code and
status but not their message, which AWS words differently from Floci.
The storeNewKeyPair Javadoc also says that the store's own locks, taken
inside the name lock, never lead back to an EC2 lock.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): name what the key pair race tests wait for

A race test whose request comes to wait anywhere other than the named
Ec2Service method now fails with a timeout that says what it waited
for, and the helper says why the method is named. The DeleteKeyPair
comment says that scan returns a new list rather than copies, and the
SDK test's cleanup comment says it waits up to 60 s.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): say what pinning the waiting method guards against

The race tests' helper Javadoc no longer says that a wait elsewhere
always skips the code under the lock: such a wait may not be at the
lock under test, so the tests time out rather than pass without
exercising it, and moving that lock into another method means updating
the name the tests give.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): park the key pair race tests' writes with ParkingStore

Both race tests held a write on a latch in an anonymous store of their
own. They now wrap the shared testing ParkingStore in
AccountAwareStorageBackend, as the Config tagging tests do, and arm its
next write: before the first request in the name race test, and after
the key pair is created in the delete test, so the write it parks is
the tag write's. The name race test creates ED25519 keys so that key
generation stays well inside ParkingStore's two-second wait. Main code
is unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-26 11:20:10 -04:00
TATSUNO “Taz” Yasuhiro ec13eda221 feat(lambdaweb): check the egress network connector as AWS does (#6647) 2026-10-26 10:51:01 -04:00
TATSUNO “Taz” Yasuhiro d42b83ceac feat(dynamodb): read PartiQL's FROM-first form of UPDATE (#6648)
* feat(dynamodb): read PartiQL's FROM-first form of UPDATE

DynamoDB accepts FROM "T" WHERE key SET ... REMOVE ..., the clauses in
PartiQL's order, and runs it as the same update as UPDATE "T" SET ...
WHERE key, under the same dynamodb:PartiQLUpdate action. Without a SET
or REMOVE the statement is not well formed, and a WHERE after them is a
token left over. Floci refused the form as not well formed.

* fix(dynamodb): refuse an UPDATE whose SET or REMOVE does not follow the table

DynamoDB answers UPDATE "T" WHERE pk = 'x' and UPDATE "T" WHERE pk = 'x'
SET c = 1 with "Statement wasn't well formed, can't be processed:
Expected data manipulation", the same as the FROM-first form with no SET
or REMOVE. The shared clause parser now makes that check for both forms.
2026-10-26 10:16:40 -04:00
Aniket Shukla a1ebc10bd1 fix(cloudmap): paginate namespace service and operation lists (#6629)
* fix(cloudmap): paginate namespace service and operation lists

* refactor(core): share bounded pagination validation

* refactor(cloudmap): reuse shared pagination checks for cloud map and bcm
2026-10-26 10:02:04 -04:00
Andre Kurait 9b36aa6980 fix(cloudformation): replace SAM OpenAPI security schemes (#6638)
Follow the separate whole-map replacement requested in upstream #6632. Preserve Swagger, no-default behavior, operation requirements and unrelated OpenAPI components.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-26 09:44:15 -04:00
Mario Toffia e9c37666c7 fix(apigateway): answer 401 when a Cognito authorizer refuses the scopes (#6636) 2026-10-26 09:36:16 -04:00
Vũ Thế Huy ce0933be9b feat(redshift): rotate managed master passwords (#6505)
* feat(redshift): rotate managed master passwords

* fix(redshift): serialize managed secret rotation

* fix(redshift): address managed secret rotation review

* fix(redshift): keep concurrent rotation retries idempotent

* fix: defer managed secret guard until rotation reservation succeeds

* fix: preserve secret versions saved during rotation reservation

* fix: guarantee required character types in serverless passwords

* revert: defer serverless password character types fix to dedicated PR

* test(secretsmanager): extract blocking reserve helper across rotators
2026-10-26 09:30:08 -04:00
David ec21cf38c7 feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate (#6106)
* feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate

DescribeCertificates lists the Region's RDS certificate authorities with the
thumbprint and validity AWS reports, vendored from the certificate bundles AWS
publishes by tools/aws/regen_rds_ca_certificates.py, and pages them.
ModifyCertificates sets or removes the account's default for new instances.
CreateDBInstance, ModifyDBInstance, the two instance restores and
CreateDBInstanceReadReplica take CACertificateIdentifier, and instances report
it with CertificateDetails. AWS::RDS::DBInstance takes the property and
resolves the two CertificateDetails attributes. The identifier is metadata:
the auth proxy keeps presenting Floci's own CA.

Closes #5806

* fix(rds): follow the user guide on CAs and leave a blank CA alone

- An instance stored without a CA reports rds-ca-rsa2048-g1, since an
  override applies only to instances created after it.
- ap-south-1, ap-southeast-4, ca-west-1, eu-central-2, eu-south-2 and
  il-central-1 offer only rds-ca-rsa2048-g1, as the user guide says.
- A blank CACertificateIdentifier on modify leaves the instance's CA.
- --download skips a Region only on 403 or 404 and exits 1 on other
  failures.
- Reuse regionFromArn, add a createDbInstance stub helper and import
  Executable in the tests.
2026-10-26 09:29:56 -04:00
TATSUNO “Taz” Yasuhiro 3438a00daf feat(lambda): version network connectors as AWS does (#6595)
* feat(lambdamicrovms): version network connectors as AWS does

* fix(lambda): lock connector versions and refresh them after a CFN rollback

Updates, deletes and version reads hold one lock, so two updates cannot
take the same version number.

A CloudFormation rollback restores the connector through an update. On
AWS that makes the next version, and a later Fn::GetAtt returns it. The
resource now keeps that version in LatestVersion and LatestVersionArn.

Read the connector ARN through AwsArnUtils.parse.

AWS refuses LatestVersion, an integer, as a string Output, so the stack
test reads LatestVersionArn only.

* fix(lambda): type the connector LatestVersion attribute as an integer

AWS::Lambda::NetworkConnector declares LatestVersion as an integer. On AWS
a stack whose string Output reads it fails with "Template format error:
Every Value member must be a string.", and Fn::Sub refuses it with
"variable Connector.LatestVersion in Fn::Sub expression does not resolve
to a string".

* chore(lambda): share the connector version ARN and integer attribute helpers
2026-10-26 08:38:47 -04:00
Andre Kurait f32db4fe49 fix(cloudformation): drop undeclared OpenAPI authorizer schemes (#6632) 2026-10-26 08:06:31 -04:00