parseSuppressedReasons moves into SesConfigurationSetController, its
only caller. structureMemberOrAbsent and typedStringMemberOrAbsent are
now used only by stringMapMemberOrAbsent, so they become private and
their unit tests go through that method instead. The dropped unit test
was the only check that an explicit null SuppressedReasons clears the
override, so that case moves to an integration test. No behaviour
change.
* fix(cloudformation): refuse every Lambda property of the wrong type
The follow-up asked on #5912. Environment, ImageConfig, Layers,
Architectures and FileSystemConfigs, and a layer's CompatibleRuntimes
and CompatibleArchitectures, went through readers that took a value of
the wrong JSON type as absent, so a malformed property reset the
function's setting instead of failing; FileSystemConfigs alone refused
one, with a message of Floci's own, and also refused an AWS::NoValue
chosen by Fn::If, which AWS accepts.
Measured on CloudFormation (eu-west-1, 2026-10-18): each fails the stack
before the resource is touched, "Property [Layers] expected type:
JSONArray, found: JSONObject", "Property [Environment] expected type:
JSONObject, found: JSONArray", "Property [Variables] expected type:
JSONObject, found: String" for Environment's Variables, a number or a
boolean reading as a String; and Ref AWS::NoValue, directly or through
Fn::If, leaves any of them out.
Every reader of the provisioner now resolves through one resolveTyped,
which omits AWS::NoValue and refuses another type with that message.
Tests: every measured case on create, AWS::NoValue on the list
properties and through Fn::If, and through the SDK a Layers object; the
FileSystemConfigs test reads the measured message. They fail on main.
* fix(cloudformation): read a list property from a CommaDelimitedList Ref as a list
Review of #5923. Layers: !Ref LayerArns, with LayerArns a
CommaDelimitedList, was refused with "Property [Layers] expected type:
JSONArray, found: String", because the engine resolves that Ref to the
comma-joined text; AWS reads it as a list.
Measured on CloudFormation (eu-west-1, 2026-10-18), Layers and
Architectures of AWS::Lambda::Function:
- a Ref to a CommaDelimitedList parameter, and Fn::Split over a String
parameter, create the stack with the list;
- a Ref to a String parameter, and Fn::If choosing a literal string, fail
validation with "expected type: JSONArray, found: String".
The string-list readers (Layers, Architectures, and a layer's
CompatibleRuntimes and CompatibleArchitectures) now go through one
resolveStringList: a literal of another type is still refused, and an
intrinsic is read through engine.resolveStringList, which splits the
comma-joined text and expands Fn::Split, Fn::GetAZs and Fn::If. The
engine keeps parameter values, not their types, so a Ref to a String
parameter reads as a list too, where AWS refuses it.
Tests: CloudFormationLambdaObjectPropertyIntegrationTest creates a
function with Layers and Architectures from CommaDelimitedList Refs and
with Layers from Fn::Split; CloudFormationLambdaObjectPropertyTest in
sdk-test-java does the CommaDelimitedList case through the SDK. Both
fail on the previous head.
* feat(lambdaweb): send what a Web Function writes to its log groups as AWS does
* chore(lambdaweb): write the Web Function runtime as an ES module
* fix(lambdaweb): create a log group or stream only when an event finds it missing
* fix(lambdaweb): cut a log line by its UTF-8 size after replacing bytes that are not UTF-8
* test(lambdaweb): wait for the last log line instead of a fixed sleep
A dynamic port binding sent a port Floci picked with ServerSocket(0), probed
where Floci runs. On Docker Desktop the daemon binds it inside the VM, whose
ephemeral range lies inside the Mac's, so a VM socket on that number failed
the start with "address already in use" and CreateDBInstance returned 500.
The binding now leaves the host port empty and the endpoint is read back from
inspect, as before.
The "1 validation error detected: ..." messages still written out by hand
outside SES now go through the helper's single-violation overloads:
validationException, validationError and badRequest for their codes, and
exception(code, violation) for InvalidParameterException,
InvalidParameterValueException and ClientException. No message changes.
* fix(stepfunctions): end a synchronous execution at its maximum execution time instead of letting it run on
* test(stepfunctions): build AslExecutor in tests through a shared fixture
* fix(stepfunctions): keep the first outcome of a timed-out Express execution and limit asynchronous Express executions too
* fix(stepfunctions): time out an execution a late runtime error reaches, and measure its deadlines on an injectable clock
* test(stepfunctions): test the synchronous caller's timeout step directly instead of on the real clock
Floci accepted ApplicationLogLevel and SystemLogLevel under Text and
dropped them, which a test pinned and the docs described as Floci's own
call rather than probed behaviour. Measured on Lambda (eu-west-1,
2026-10-18): CreateFunction and UpdateFunctionConfiguration refuse either
level under Text, whether LogFormat names Text or is left to that
default, with InvalidParameterValueException "LogLevel is not supported
when LogFormat is set to "Text". Remove LogLevel from your request or
change the LogFormat to "JSON" and try again." In a stack, a valid level
under Text passes the template's validation and fails the resource with
Lambda's message. Floci now refuses it in validateLoggingConfig, so the
API and the CloudFormation update check, which validates through
loggingSettings, both do; and its enum errors list the levels in Lambda's
order: [FATAL, TRACE, WARN, ERROR, INFO, DEBUG] and [WARN, INFO, DEBUG].
The default format is worked out in one place, logFormat, for the
validation and for loggingSettings.
Tests: a level under Text refused on create and on update through the API
(LambdaVpcSnapStartLoggingIntegrationTest, replacing the test that pinned
the old behaviour) and through the SDK (LambdaFunctionConfigTest), by
loggingSettings (LambdaServiceTest), and by a stack update
(CloudFormationLambdaLoggingConfigIntegrationTest); the enum messages'
order. They fail on main.
* fix(cloudformation): report a failed resource in the stack's rollback reason the way AWS does
The stack's ROLLBACK_IN_PROGRESS / UPDATE_ROLLBACK_IN_PROGRESS reason and
event now name the failed resource, "The following resource(s) failed to
create: [X]. Rollback requested by user." on a create and "failed to
update: [X]." on an update, and the resource's own message stays on its
event. A nested stack's parent resource and a stack set instance still
report that message, read from the stack's events.
* fix(cloudformation): tell a stack's own events from a resource that shares its name
failureCause matched the stack's own events by logical ID alone, so a
resource whose logical ID equals the stack name ended the backward walk
and the nested stack parent and stack set instance got the rollback
summary instead of the resource's message. Match the stack ID as well.
* fix(cloudformation): give a nested stack's parent the child's own reason
AWS puts the child stack's reason on the parent's nested stack resource,
"Embedded stack <arn> was not successfully created: The following
resource(s) failed to create: [X].", so the parent reads the child's
status reason again instead of the failed resource's message. A stack
set instance keeps the resource's message.
* fix(cloudformation): refuse a Lambda function property that is not an object
The AWS::Lambda::Function provisioner read an object property that
resolved to a scalar or a list as absent, so a malformed VpcConfig,
DeadLetterConfig, TracingConfig or EphemeralStorage reset the function's
setting to its default instead of failing. Measured on CloudFormation
(eu-west-1, 2026-10-18): such a value fails the stack before the function
is touched, on create and on update, with "Property [VpcConfig] expected
type: JSONObject, found: String"; a list reads "found: JSONArray", and a
number or a boolean reads "found: String" too.
resolveMapOrDefault, which reads every object property of the function,
now refuses such a value with that message. AWS reports it from its
pre-deployment validation, with the detail in DescribeEvents, which Floci
does not model; the message is on the resource's failed event.
Tests: CloudFormationLambdaObjectPropertyIntegrationTest (a number VpcConfig
and a list DeadLetterConfig on create, a string TracingConfig on update that
keeps the setting) and, through the SDK, CloudFormationLambdaObjectPropertyTest;
both fail on main. The compatibility suite gains TestFixtures.awaitStackTerminal,
the same helper #5902 adds.
* fix(cloudformation): leave out a Lambda property that resolves to AWS::NoValue
Floci's template engine resolves Ref AWS::NoValue to an empty text node,
which the new type check refused as a String, so a valid template that
leaves VpcConfig, TracingConfig, DeadLetterConfig or EphemeralStorage out
through AWS::NoValue, directly or chosen by Fn::If, failed. Measured on
CloudFormation (eu-west-1, 2026-10-18): both stacks are created.
resolveMapOrDefault now resolves with resolveNodeOmittingNoValue, as other
provisioners do for optional properties, and reads what it leaves out as
the default.
Test: a direct Ref AWS::NoValue on VpcConfig and TracingConfig, and an
Fn::If choosing it for DeadLetterConfig, each create the stack; it fails
on the previous head.
* fix(dynamodb): use the AWS wording for unprojected GSI attributes in Query and Scan
* refactor(dynamodb): share the unprojected GSI attribute error with PartiQL
* fix(dynamodb): check PartiQL GSI columns after the WHERE clause
AWS reports a key type mismatch, overlapping ranges, too many reads and an
unprojected filter attribute before an unprojected column. It also lists
each column root once.
* fix(dynamodb): keep rejecting a projection path that starts with a list index
SmithyValidationErrors gains named factories for the three common codes
(validationException, validationError, badRequest) and a single-violation
overload of each. The "N validation errors detected" builders outside SES
(CloudFormation, Cognito, DynamoDB, EventBridge, Firehose, IAM, IoT, KMS,
Lambda, Rekognition, SSM) and the remaining hand-written
"1 validation error detected" messages in SES move onto it. No message
changes.
* fix(cloudformation): pass a function's LoggingConfig to Lambda
The AWS::Lambda::Function provisioner never read LoggingConfig, so every
function a stack created logged in Text to /aws/lambda/<name>, whatever
the template said, and an update to it was never applied.
Measured on AWS (eu-west-1, 2026-10-16): the function reads back the
LogGroup the template names; a change to JSON with an ApplicationLogLevel
updates it in place, SystemLogLevel reading back INFO; and removing the
property from the template puts the function back on Text and
/aws/lambda/<name>, again in place. So the provisioner always sends a
LoggingConfig, empty when the template has none, which Lambda resolves to
the function's defaults (JSON for a durable function, which refuses
Text).
The update check compares what Lambda would store, through the same
LambdaService.loggingSettings that UpdateFunctionConfiguration applies,
so an unchanged LoggingConfig is still a no-op redeploy and the two
cannot drift apart.
Tests: the stack lifecycle in CloudFormationLambdaLoggingConfigIntegrationTest
and, through the SDK clients, CloudFormationLambdaLoggingConfigTest, both
failing on main; the normaliser in LambdaServiceTest. The compatibility
suite gains TestFixtures.awaitStackTerminal for the new test rather than
another private copy of the stack wait.
* fix(cloudformation): refuse an invalid log level before comparing LoggingConfig
The update check compared normalised logging settings, and the normaliser
dropped both log levels under Text before anything validated them. An
update whose only change was an invalid level, ApplicationLogLevel VERBOSE
on a Text function, then looked unchanged, never reached
UpdateFunctionConfiguration, and the stack went UPDATE_COMPLETE where
AWS fails the update. LambdaService.loggingSettings now runs
validateLoggingConfig before it normalises, so the comparison refuses
what Lambda refuses, and applyLoggingConfig validates once, through it.
The integration test registers its stacks' deletion with PartitionCleanup,
and the compatibility test's cleanup no longer swallows a failed
DeleteStack, which succeeds for a stack that is already gone.
* fix(appsync): answer a bad AWS_IAM signature with AppSync's error and wording
AppSync answers 403 IncompleteSignatureException when the Authorization
header misses a part or the date, and 400 BadRequestException when the
signing time, the signed headers, the scope or the signature are wrong.
The checks run in AppSync's order, and the signature is checked before
the session token.
* fix(appsync): answer an AWS_IAM policy deny with Permission denied
AppSync answers 401 UnauthorizedException "Permission denied" when the
caller's policies do not allow appsync:GraphQL.
* fix(appsync): check a missing signed header and the credential parts in AppSync's order
AppSync checks that every signed header is in the request after the
signing time, then that host is signed, then the credential parts. It
names the header as the request signed it.
* test(appsync): expect BadRequestException for a wrong secret on the GraphQL endpoint
* test(appsync): pin the clock to check the whole signing time message
* chore(appsync): read the Authorization parts with the shared parser
Under IAM enforcement, CopyObject and UploadPartCopy also need
s3:GetObject on the copy source, or s3:GetObjectVersion for a version,
and S3Controller checks it itself, since the source appears only in the
x-amz-copy-source header. It passed IAM the Authorization header, which
a presigned request does not have, so IAM skipped the check. A user
allowed to write one place could presign a copy of any object they
cannot read into it.
The check now uses the request's credential, the header's or a
presigned URL's query credential, as the copied-tags check next to it
already does. The S3 user guide says "The capabilities of a presigned
URL are limited by the permissions of the user who created it."
The test signer's presignedQuery also signs the parameters already in
its URI's query, such as an UploadPartCopy's upload id, so a presigned
part copy verifies, and refuses a URI that is already presigned. docs/services/iam.md lists the copy source check.
A request naming versionId=null asks for the null version, the one an
object written while versioning was off or suspended has. GetObject,
HeadObject, GetObjectAttributes, a copy source and the annotation
operations served the current version for it instead, even on a key
with no null version, so a request authorized for the null version was
served another. Retention, legal hold and the object ACL looked for a
version stored under the id "null", which never exists, so they never
found the null version even when there was one.
Every lookup now resolves the id the way tagging and DeleteObject
already did: the null version is the object at the plain key when it
has no version id, and a key without one answers as for any missing
version, NoSuchVersion, or NoSuchKey for the annotation operations as
for their other missing versions. A read of the null version goes
through the same optimistic snapshot as a read of the current version,
so a write landing mid-read cannot pair one version's metadata with
another's bytes. The s3:ExistingObjectTag lookup reads the null
version's tags the same way, and under s3.enforce-auth an anonymous
read naming the null version is checked against that version's ACL.
Refs #5716
Slice 11 of #4542.
Eight classes each declared a profile for one setting of one service:
the AgentCore runtime check, the seeded IAM account alias, the Kinesis
ListShards token lifetime, the Neptune db type, the Route53 VPC
association delay, the CloudFront private origin allowance, the Cognito
token validity limits and the Scheduler background dispatcher. They now
share IndependentServiceSettingsProfile.
Each setting is read by a single service, and each class is the only
one in the group that calls its service, so no override reaches
another class, and neither does anything a class leaves behind. A class
that shares a service with one already there takes a profile of its
own.
The Route53 profile also set floci.storage.mode=memory, which the test
application.yml already sets, so it is dropped.
The profile's javadoc lists each override, the class that relies on
it, and why it is inert for the others. Each class gains a javadoc
paragraph saying what it gets from it.
IAM temporary delegation lets an AWS Partner ask a customer for scoped,
time-limited access to the customer's account: the partner files a request,
the customer claims and answers it, and an accepted request releases an
exchange token the partner trades for credentials. Floci dispatched none of
it, so all seven lifecycle operations answered UnsupportedOperation 400.
The family was filed as a non-goal on the strength of
CreateDelegationRequest stating "This API is not available for general use.
In order to use this API, a caller first need to go through an onboarding
process described in the partner onboarding documentation". That sentence
appears exactly once in the whole API reference, and the partner user guide
describes a generally available feature with a published lifecycle. The gate
is an AWS-side account allowlist for ISV Accelerate partners, "Enable API
access for your specified accounts", not a protocol behaviour, and an
emulator has no allowlist. Answering NoSuchEntity because nothing can exist
would emulate the feature's absence rather than the feature.
This is the lifecycle half: Create, Associate, Accept, Reject, Update, Get
and List. SendDelegationToken and STS GetDelegatedAccessToken are the token
exchange and come next, so no request reaches FINALIZED yet, and
GetHumanReadableSummary stays undispatched because its summary is LLM-
generated on AWS.
A delegation request is the one IAM record two accounts share, which decides
how it is stored: keyed by id under the creating account and resolved across
accounts on read, because the reference makes the id globally resolvable and
decides access from the request's own owner fields. A request nobody owns
"can be called by any account"; one naming a target account is readable only
from there, which is why a partner loses sight of its own filing once it is
aimed. Floci decides that at account granularity, there being no per-
identity permission on a request to consult. ListDelegationRequests leaves
out a request with no owner even when it names the listing account, as the
reference states, so a partner does not list its own filings at all, which
matches the guide telling partners to track state from the notifications.
Expiry is applied when a request is next read rather than swept by a worker.
Each state carries the window AWS publishes, a day for UNASSIGNED and a week
for every other state including the terminal ones, and a request past its
window reads back as EXPIRED. That needs no scheduler to be correct and no
clock to be mocked globally, so the service takes its own Clock and the unit
test advances that rather than the shared test clock.
Two answers had to be chosen rather than read off. An operation asked to move
a request out of a state it no longer holds answers ConcurrentModification:
no modeled error says "wrong state", and AcceptDelegationRequest models only
NoSuchEntity, ServiceFailure and ConcurrentModification, so the conflict is
the closest of the three and is used on all four writers rather than a
different code each. PermissionCheckResult answers UNSURE when the check is
asked for, which the enum models, because a delegation request carries no
permission to evaluate.
A member that breaks the format or constraints it declares answers
ValidationError. The reference publishes that as a common error, "the input
doesn't meet the required format or constraints", for every IAM operation
while listing it on no operation at all, which is why it appears in no error
table and in none of these; the rest of IAM answers it in the same shape and
wording, so these operations do too. The InvalidInput they do model is kept
for a value that cannot be read as the member's type, which is where the
shared pagination already puts a MaxItems that is not a number.
A lifecycle call reads a request, checks its state and writes it back, so all
of them take one lock, as the sibling IAM services do with theirs. Without it
two callers could both claim the same unassigned request and the later write
would decide the owner, and two creates could both pass the workflow-id
uniqueness check. Each call also takes a single clock reading, threaded from
the lookup into the transition, so a request cannot be expired on the way in
and moved on anyway.
Two shape details come from the pinned botocore model rather than the
reference PDF, which omits both: GetDelegationRequest also takes
DelegationPermissionCheck and answers PermissionCheckStatus and
PermissionCheckResult, and ListDelegationRequests spells its flag
isTruncated in lower case where every other IAM list spells it IsTruncated.
The model names the member, so the wire follows the model. SessionDuration's
300 to 43200 range, PolicyParameter's shape and the 100-default,
1000-maximum page size come from there too.
The CLI reference supplies the constraints the PDF leaves hard to read: the
redirect URL's whole pattern, which the PDF breaks across a line, the
character class the free-text members carry, and the printable-ASCII class
on a policy parameter's name and values. Each is enforced. It also settles
that the Permissions structure is required while both of its members are
optional, marking neither. Reading it is what caught an empty required
member being treated as an omission: Description is required and its pattern
permits an empty string, so Description= is a value and only an absent
member is missing, which is a distinction that exists on the wire and is
tested there.
Notes and RejectionReason both exist on the shape and each gets exactly one
writer: an update carries notes for an administrator and a rejection carries
the explanation the reference describes for it.
An indexed member is read from the keys the request carries rather than
counted up from one, so Parameters.member.2 without a member.1 keeps its
entry instead of being dropped at the gap, and a boolean member has to carry
true or false rather than being read as false for anything else.
delegation-request leaves ResourceArnBuilder.UNRESOLVED_TYPES, since that
entry claimed the type belongs only to actions nothing dispatches. The four
by-id actions mint arn:<partition>:iam::<account>:delegation-request/<id>
from the request, the same way the ARN-carrying actions pass an ARN through,
one step earlier. CreateDelegationRequest stays at the wildcard because IAM
assigns the id, and UpdateDelegationRequest stays there because AWS
publishes no authorizable action for it at all.
UnresolvedResourceTypesIntegrationTest would have failed until this was
done, which is that test working as intended.
The console deep link follows the partition too. CreateDelegationRequest
answers the URL the partner redirects the customer to, and a caller in China
or GovCloud was handed a console their account cannot reach. The host now
comes from the region's partition, the way the CodePipeline approval links
already resolve theirs, keeping the commercial console's path because that
is the only path any partition publishes. The account-root stand-in behind
an owner ARN is minted through RegionResolver for the same reason rather
than concatenated, which is also the shape IamEnforcementFilter synthesizes.
Nothing is enforced that AWS does not publish. LimitExceeded is modeled with
no quota behind it, so none is invented. NotificationChannel is validated
and stored and nothing reads it, there being no notification to send yet.
PolicyTemplateArn is kept as given and resolved against nothing, templates
being registered by email with no API.
All four new model types are registered for reflection, the state enum
included: it is reachable from a stored request, and a native image that
cannot read it back loses every delegation request on restart, which is what
the persistence guard checks.
Twenty-seven unit tests drive the state machine, both expiry windows, the
two races and the deep link in each partition, with a clock the test owns,
and fifteen integration tests drive the lifecycle over the wire across two
accounts, the access key id being the account id as the rest of the suite
does it. Routing needs nothing added: #5879 has the Query router read each
service's actions from its botocore model, which names all seven already, so
the matrix row in docs/services/index.md moving 167 to 174 is the only count
this changes.
* fix(ses): check v2 metrics, import, export and account bodies against the service model
BatchGetMetricData, CreateImportJob, CreateExportJob,
PutAccountSuppressionAttributes and PutAccountVdmAttributes now check their
body against the vendored SES v2 shapes before their own validation, as the
send and configuration set operations do. A member of the wrong JSON type,
nested ones included, is a SerializationException with the deserializer's
message. BatchGetMetricData keeps its Virtual Deliverability Manager gate
ahead of the check.
The type checks the walk makes unreachable are removed from the metrics,
import and account handlers and from the export service; null list
elements are still rejected where they were before.
* docs(ses): describe what the export filter validation still checks
* style(ses): drop the AwsException import the filter check no longer uses
FilterLogEvents kept an event when its message contained filterPattern as
a substring. A JSON pattern such as { $.template = "sign-in-code" } then
never matched, and terms matched where AWS does not: an unquoted
sign-in-code, which AWS reads with its own term rules, matched every
message containing those characters.
Measured on AWS (eu-west-1, 2026-10-16) on five events, JSON, plain and
mixed: JSON patterns over nested paths and numbers, case-sensitive terms,
quoted phrases, ?alternatives and -exclusions each matched exactly the
events the parser Floci already uses for metric and subscription filters
matches. So FilterLogEvents now parses its pattern with it, once, before
the scan, and an invalid one is refused with InvalidParameterException
whatever the group holds.
The error text is the parser's own, as for PutMetricFilter and
TestMetricFilter; AWS words these differently per action, which is left
for a change of its own.
Tests: the measured events and patterns in CloudWatchLogsServiceTest and,
through the SDK, CloudWatchLogsFilterPatternTest, which fails on main.
* perf(logs): evict past the ceiling and retention without scanning the store
Every PutLogEvents listed the account's whole event store twice: once
to apply the group's retention policy, once to enforce the stored-event
ceiling, which also loaded and sorted every event once the store was
full. Each listing walks every key of every account. So once an account
reached max-stored-events (20000 by default), each call cost a sort of
the full store, however few events it carried.
Sources that put one event per call pay that on every line: EKS
control-plane audit logs forward each audit record as its own call.
At the default ceiling with a retention policy set, a single-event
call took about 4.3 ms; it now takes about 5 us.
An account's event keys are now kept in an in-memory index ordered as
the store is read (timestamp, ingestion sequence, event id), with one
ordered set per log group. Retention removes a group's events older
than the cutoff from the head of its set; the ceiling removes the
oldest across the account. Which events are dropped, and when, is
unchanged, except for names that hold "::".
Keys join region, group and stream with "::" and are not escaped, so
"r::/app::" is a prefix of "/app::logs"'s keys and of "/app"'s stream
"logs", and "/app"'s stream "logs::s" and "/app::logs"'s stream "s"
share one stream key. For retention and stream deletion the group now
comes from the group, not the prefix:
- each index entry carries the group it was written to, so retention
for "/app" takes neither "/app::logs"'s events nor the reverse
- deleting a stream removes only keys that are that stream's prefix
followed by the timestamp and id, and drops them from the index by
key, whatever group they are filed under
- PutLogEvents and DeleteLogStream refuse, as a missing stream, a
stream found by key whose recorded group is another;
DescribeLogStreams lists only streams that record its group
- DeleteLogGroup deletes only the streams, metric filters and
subscription filters that record its group
- a refill reads each key's group off the stream it names, one stream
lookup per stored event; an event whose stream is gone is deleted,
as DeleteLogStream would have, since nothing says which group it
was in
Every stream is created with its group recorded. A record without one
can only be built by hand, and counts as the caller's.
Reads (GetLogEvents, FilterLogEvents, Insights) still select events by
prefix, as before; this change leaves them alone.
Each account keeps one index for the life of the service, and every
write to its events (PutLogEvents and deleting a stream or group)
changes the store and the index while holding the index's lock, so the
two change together and concurrent calls no longer overshoot the
ceiling. The index starts stale and the first call holding it fills it
from the store, so events stored before a restart count. A key leaves
the index only after its store delete succeeds. A store write that
throws part-way, exception or Error, marks the index stale. Emulator
reset empties every index and marks it stale in beforeReset(), clear()
and afterReset(), so an account that never writes again holds nothing
for the wiped events; the next call refills from the store. The index
is never replaced, so a call waiting on its lock never writes under a
different one.
A put racing DeleteLogStream could write events after the stream was
gone, or write the deleted stream's metadata back. DeleteLogStream and
DeleteLogGroup now remove the stream record and its events together
under the lock. PutLogEvents checks the stream again under it, and
writes the stream's metadata there too. So a put lands before the
delete or finds no stream, and a stream recreated under the same name
cannot write until the old one's events are gone.
Calls for one account now take that lock in turn, store write
included; different accounts do not wait on each other.
* refactor(logs): read an event's group off its key
AWS allows no colon in a log group or stream name, so the key layout
needs no defending inside this change. The index takes each event's
group from its key, the refill no longer probes streams split by split
or deletes events it can't place, and the stream lookups go back to
what main does. The tests for separator-bearing names go with it.
---------
Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
Co-authored-by: Priamo <pgermosen@gmail.com>
* fix(lambda): send a function's logs to the log group its LoggingConfig names
Floci stored LoggingConfig.LogGroup and read it back, but every execution
environment still wrote to /aws/lambda/<name> and told the function so in
AWS_LAMBDA_LOG_GROUP_NAME. Measured on AWS (eu-west-1, 2026-10-16): a
function whose LoggingConfig names a group writes INIT_START, START, its
own output, END and REPORT there, Lambda creates the group when it is
missing, and /aws/lambda/<name> is never created. AWS_LAMBDA_LOG_GROUP_NAME
and AWS_LAMBDA_LOG_STREAM_NAME name that group and stream.
Once LoggingConfig names a group, which several functions can share, each
stream's name carries the function's name: 2026/10/16/my-fn[$LATEST]<id>
instead of 2026/10/16/[$LATEST]<id>. It does even when the group named is
/aws/lambda/<name> itself, so the rule is whether a group is named, not
whether it differs from the default.
Both launchers, Docker and Kubernetes, and GetFunctionConfiguration's
LoggingConfig now take the group and the stream from one place,
LambdaLogDestinations.
Floci skips delivering a log group to a Lambda subscription destination
that writes its own logs there, which would feed the function its own
output forever. That check assumed the group was /aws/lambda/<name>, so a
forwarder subscribed to the group its LoggingConfig names would loop. It
now asks LambdaLogDestinations for the function's group, and falls back
to the default name, from the same place, for a function it cannot find.
* fix(logs): skip only a function's own streams when it forwards its log group
The guard that keeps a subscription from feeding a Lambda destination its
own output looked the function up by name in the caller's account and
Region at $LATEST, and skipped the whole group once it matched. In a group
LoggingConfig names, which several functions can share, a forwarder then
lost every other function's logs; a destination naming a published version
or alias was checked against $LATEST's group; and a function in another
account than the ambient one was not found, so its own custom group was
fed back to it.
The function is now the one the destination ARN names, through
getFunctionByArn, with its account, Region and qualifier, and in a named
group only the streams carrying its name are skipped, the shape measured
on AWS for a named group (2026/10/16/<name>[$LATEST]<id>); every stream of
the default group is still the function's own. A destination ARN that
does not parse as a function's is not a loop and is no longer caught as
any RuntimeException.
Tests: another function's stream in a shared group reaches the
forwarder while its own is skipped, and a destination naming a published
version is checked against that version's group (both fail on the
previous head); the stream ownership rule in LambdaLogDestinationsTest.
* feat(core): translate LocalStack variables in Java instead of the entrypoint
The LocalStack-to-Floci variable mapping (PERSISTENCE, EDGE_PORT,
LOCALSTACK_HOST, GATEWAY_LISTEN, LS_LOG/DEBUG, the Lambda and Docker
variables, the DNS suffixes, USE_SSL, CUSTOM_SSL_CERT_PATH) lived in
docker/localstack-parity.sh, sourced by the image's entrypoint. A JVM run or
a native binary on the host never saw it.
LocalStackParity now computes the same mapping and LocalStackParityConfigSource
serves it at ordinal 301, just above environment variables, as the exported
variables did. A key is produced only when its Floci variable is unset, so an
explicit Floci setting still wins; the DNS suffixes are still appended to any
configured ones; LOCALSTACK_PARITY=false still turns it all off.
TlsConfigSource, which reads its properties before the configuration exists,
consults the mapping too.
The script, its shell test and every Dockerfile copy of it are removed; the
test cases move to LocalStackParityTest.
Refs #5767
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): keep TLS backends on loopback, keep configured DNS suffixes, and pass LocalStack settings to hooks
Review follow-ups for the Java LocalStack translation:
- Dockerfile.compat took docker-entrypoint.sh from the published native
image, which still sourced the removed localstack-parity.sh, so the compat
image never became healthy. It now copies the entrypoint from the build
context, as it already does healthcheck.sh.
- At ordinal 301 the parity source outranked TlsConfigSource's loopback pin
(300): with TLS on and GATEWAY_LISTEN set, the backends bound the gateway
address while the proxy dialled 127.0.0.1. It now sits at 299, below
environment variables and the TLS source and above .env and
config/application.yml, where the exported variables used to be.
- floci.dns.extra-suffixes is no longer a translated property, which on JVM
and native runs replaced suffixes set in application.yml. The five
readers append LocalStack's and Floci's suffixes to the configured list
through LocalStackParity.withDnsSuffixes instead.
- GATEWAY_LISTEN=0.0.0.0:4566 (or [::]:4566, or a list) gives the host to
quarkus.http.host and the port to floci.port when EDGE_PORT is unset,
instead of a host Floci rejects as malformed.
- Init hooks get the translation as FLOCI_*/QUARKUS_* variables again, as
they did when the entrypoint exported them.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): parse LOCALSTACK_HOST and GATEWAY_LISTEN the way LocalStack does
Both take LocalStack's host-and-port forms (HostAndPort.parse in its
config.py): host:port, host, :port, [v6]:port and [v6].
- LOCALSTACK_HOST is <hostname>:<port>, localhost.localstack.cloud:4566 by
default. Its port went into floci.hostname, so the base URL came out as
http://localhost.localstack.cloud:4566:4566. floci.hostname now gets the
host alone.
- GATEWAY_LISTEN=:4566, LocalStack's default host on 4566, did not match
and stopped startup with "Refusing to listen on malformed host". An empty
host now keeps Floci's own bind address and takes just the port.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(ecr): give every data plane exchange its own registry connection
An HTTP/2 client such as crane sends a whole push as streams on one
connection. The data plane paused each stream until the shared Vert.x
client handed it a registry connection, from a pool of five. With more
uploads than that, the waiting streams kept their unread bytes, which
hold the client connection's flow-control window; the five uploads that
had a registry connection stopped receiving data, never finished, and
never gave their connection back. Every later registry request,
GET /v2/ included, then waited behind them until Floci restarted.
A larger pool only moves the threshold: HTTP/2 allows any number of
concurrent streams, and several client connections can fill a pool of
any size while each still has a stream waiting. So each exchange now
opens a client of its own and closes it when the exchange ends, and no
request ever waits for a connection another request holds.
An exchange also ends when its client goes away mid-upload (#5573). A
client that reset its HTTP/2 stream or closed its connection left the
registry request waiting for the rest of a body with a Content-Length,
which registry:2 never answers, and the exchange kept its connection and
its immutable tag lock. The response's close handler, which HTTP/2
always calls when the stream closes, and the request's exception handler
now end the exchange, closing its client and so its registry connection.
The end runs once: the close handler also fires after an exchange that
ended normally, by which time another exchange may hold the same
immutable tag, which a second release would drop.
Tests: eight HTTP/2 uploads on one connection all reach the registry and
every exchange closes the connection it opened (they time out on main);
an upload reset mid-body closes its registry connection (it stays open
on main). The data plane tests build their data plane through one helper
instead of four copies of the same mocks, router and server.
* fix(ecr): end an exchange whose client leaves during the tag check
The handlers that end an exchange when its client goes away were set only
once the registry check of an immutable tag had finished. A client that
reset its stream during that check was never seen: the exchange then
proxied a request that was already gone, its registry request waited for
a body that never came, and the tag stayed locked, so every later write
of it was refused as if the tag existed.
The exchange now starts before the check, with those handlers, and the
check's result is dropped when the client has already left: nothing of it
reaches the registry, and its tag is free at once. Once an exchange has a
registry client, its tag is freed only when that client has closed the
registry connection, so another write of the tag cannot start its check
while this one can still reach the registry. A failure answer is no longer
written to a client that went away.
Tests: a write reset during the tag check never reaches the registry and
the next write of the tag succeeds (on the previous head it is refused
with TAG_INVALID); the two HTTP/2 tests now assert that their exchanges
are HTTP/2.
Floci rewrites an AWS-shaped ECR image of an ECS task or an image-backed
Lambda to its loopback registry and hands that address to the Docker
daemon, as <account>.dkr.ecr.<region>.localhost:<port>/<repo> in the
hostname style. A daemon with the containerd image store, the default
from Docker Engine 29, cannot pull from it. Measured on Docker 29.9.1:
against a plain HTTP registry:2, localhost:<port> and 127.0.0.1:<port>
are reached over HTTP, while any *.localhost name is tried over HTTPS
only ("server gave HTTP response to HTTPS client"), the 127.0.0.0/8
insecure CIDR notwithstanding. With Floci's TLS on, the same names reach
Floci's TLS port and fail on its certificate instead (unknown authority,
and *.localhost names are not in it). The containers never start: ECS
reports TaskFailedToStart.
So the rewrite now always gives localhost:<port>/<account>/<region>/<repo>,
path style, in either URI style and with or without TLS: the address
every daemon, classic or containerd store, pulls from over plain HTTP.
The data plane claims path-style requests on a loopback host (localhost,
127.0.0.0/8, ::1) in the hostname style too, so those pulls still go
through it and its repository name mapping. Nothing else changes: the
advertised repositoryUri, the login endpoint and pushes keep their style.
* feat(cloudformation): support SAM's optional AutoPublishAlias version properties
With AutoPublishAlias, read the three function properties SAM uses to
shape the version it publishes:
- AutoPublishCodeSha256: a string names the version by its first ten
characters instead of the hash, so new code under the same value
publishes nothing. A Ref to a parameter resolves first.
- AutoPublishAliasAllProperties: the hash covers every property the
transform gives the function, plus its SnapStart.
- VersionDeletionPolicy: the version's DeletionPolicy when the
function sets none; a function with a CapacityProviderConfig
defaults to Delete, any other to Retain. An intrinsic value is
copied unresolved, as SAM copies it.
Each gets SAM's type checks and messages: AutoPublishCodeSha256 must
be a string and make an alphanumeric id, AutoPublishAliasAllProperties
a boolean, and VersionDeletionPolicy Delete or Retain, only with
AutoPublishAlias.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): pin the default Ref hash and AutoPublishAliasAllProperties coverage
Keep the check that a Ref in the code changes the version id without
AutoPublishAliasAllProperties, and show that with it a Timeout change
names a new version and false hashes as if the property were absent.
Pin that an AutoPublishCodeSha256 Ref resolving to an empty value
leaves the hash in place. The docs say that ids under
AutoPublishAliasAllProperties are floci's own and that a Ref to a
parameter works for AutoPublishCodeSha256.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(cloudformation): refuse AutoPublishCodeSha256 in SAM Globals
SAM refuses a Globals property it does not list for a section, and
Globals.Function does not list AutoPublishCodeSha256. Now that the
property names the version, merging it from Globals would give every
function the same version id, so a code change would never publish.
Refuse the template with SAM's message, without the list of supported
properties that SAM appends.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): pin the AutoPublishAliasAllProperties ids and SAM version updates
Pin two version ids under AutoPublishAliasAllProperties to the SHA-1 of
the generated function's properties, worked out by hand, and that a
given AutoPublishCodeSha256 still names the version there. Show that
Globals.Function carries AutoPublishAliasAllProperties and
VersionDeletionPolicy. On a stack, a Timeout change under
AutoPublishAliasAllProperties publishes version 2 with the new timeout,
and VersionDeletionPolicy: Delete reports the replaced version
DELETE_COMPLETE instead of DELETE_SKIPPED. An intrinsic
VersionDeletionPolicy is copied unresolved, which the assertion now
says.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(cloudformation): say when a new SAM version id publishes
Say which statements about the version id hold by default, that
AutoPublishCodeSha256 outranks AutoPublishAliasAllProperties and cannot
come from Globals, and when a new id publishes nothing: SnapStart, a new
AutoPublishCodeSha256 alone, or, under AutoPublishAliasAllProperties, a
Tags or ReservedConcurrentExecutions change, which AWS fails with "A
version for this Lambda function exists". A hot-reloaded function
publishes for every new id. State the DeletionPolicy order, and that
CloudFormation takes intrinsic functions only in resource properties,
outputs, metadata and update policies. The javadocs of the version id
and of AutoPublishAlias say the same.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(cloudformation): note IgnoreGlobals and LanguageExtensions for SAM versions
Say that floci does not honour IgnoreGlobals, so a function cannot opt
out of a VersionDeletionPolicy in Globals, and that an intrinsic
VersionDeletionPolicy reaches CloudFormation only through a transform
such as AWS::LanguageExtensions, which floci does not implement. Under
AutoPublishAliasAllProperties the code's parameter references are still
resolved, and any SnapStart change publishes nothing.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): pin the SnapStart id under AutoPublishAliasAllProperties
Pin the id a SnapStart with ApplyOn None gives under
AutoPublishAliasAllProperties, worked out by hand like the others, and
show that a version VersionDeletionPolicy: Delete reports deleted is
still listed, as the docs say floci keeps every version it publishes.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(cloudformation): say that IgnoreGlobals is the opt-out floci ignores
A function can still clear a Globals VersionDeletionPolicy with a null
of its own; what floci does not honour is IgnoreGlobals.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
AWS answers 403 UnrecognizedClientException "The security token included
in the request is invalid" to a long-term key with a session token, and to
a temporary key with a wrong one. An unknown key, a temporary key with no
token and an empty token get the same message with a period.
AppSync now uses the session token check API Gateway and Lambda Web share.
When a resource failed, rollbackFailedExecution set the stack status to
CREATE_FAILED or UPDATE_FAILED and added a stack event with that status
before moving the stack to ROLLBACK_IN_PROGRESS or
UPDATE_ROLLBACK_IN_PROGRESS; the update exception path did the same. AWS
reports those statuses on the failed resource only, and on the stack only
when rollback is disabled. A DescribeStacks poll landing between the
writes read UPDATE_FAILED and stopped, which made the nested stack
rollback test in CloudFormationDeletionPolicyIntegrationTest flaky.
Drop the transient status and event, and publish each rollback status
after its reason and event so a poll that sees the status sees both.
CfnStackWaits no longer needs to wait out the transient status.
* fix(ssm): separate shell execution and delivery timeouts
* fix(ssm): require a command list for public shell requests
* test(ssm): share command request and cleanup fixtures
* chore(release): publish standalone floci-aws binaries as release assets
The release already built Linux native executables, but only to package them
into the images; they were discarded after a day and releases carried no
assets. Users without Docker had nothing to download.
release.yml now also builds macOS (arm64, and x86_64 under Rosetta) and Windows
x86_64 binaries with GraalVM Community, smoke-tests every binary on its own
runner with .github/scripts/smoke-binary.sh (version matches the tag, SQS and
DynamoDB round trips, clean stop on SIGTERM), and checks that the Linux amd64
binary still starts on glibc 2.34 (Ubuntu 22.04). A new publish-binaries job,
the only one with write access to the release, stages the six executables as
floci-aws-<os>-<arch>, writes sha256sums.txt, signs every file with keyless
cosign sign-blob, attests build provenance, and uploads them to the release
semantic-release created. Build artifacts are kept 7 days so that job can be
re-run on its own.
make native-install now installs floci-aws, since floci is the CLI.
Refs #5767
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(release): check the glibc 2.34 floor on every Linux binary and wait for the release
Review follow-ups for the binary release jobs:
- The floor check started the amd64 binary on Ubuntu 22.04, whose glibc is
2.35, so a binary that needed 2.35 would have passed. check-glibc-floor.sh
now reads the newest GLIBC_ symbol version the binary requires with
readelf and fails above 2.34, then starts it in UBI 9, whose glibc is 2.34.
- The two arm64 builds had no floor check at all; they run the same script.
- publish-binaries waits up to 10 minutes for semantic-release to create the
GitHub Release before uploading, instead of failing if it is not there yet.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(release): build darwin-amd64 with a pinned, checksummed GraalVM Community
The macOS x86_64 job downloaded Oracle GraalVM from download.oracle.com's
"latest" URL: not the Community build the job's comment names, unpinned and
unchecked, though its output is then signed and attested as ours. It now
fetches GraalVM Community 25.0.1, the last release with a macOS x64 build,
from graalvm-ce-builds and checks it against the published SHA-256 before
extracting it.
The publish-binaries header said semantic-release creates the release
before pushing the tag; it pushes the tag first, as the upload step says.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(ses): validate v2 tracking configuration overrides
SendEmail and SendBulkEmail now check ConfigurationOverrides.Tracking's
values the way SES v2 does: a value outside ENABLED/DISABLED is a
validation error, both values reported together with the click one first,
ahead of the tags and the configuration set. The shapes pre-check already
refuses a wrong JSON type. Floci has no open or click tracking, so a valid
override is accepted and has no effect.
* test(ses): check a refused tracking override records no message
* refactor(core): share the Smithy validation-error message
The "N validation error(s) detected: a; b" message is Smithy's, not SES's, yet
SES built it in eight places, plus five helpers that wrote the single-violation
form by hand. They now all go through core.common.SmithyValidationErrors,
which takes the protocol's error code. No message changes.
Copies one or more versions of a package between repositories in the same
domain, matching AWS's documented all-or-nothing batch semantics: a version
missing from the source fails NOT_FOUND, a version already identical at the
destination is a silent no-op, a differing one fails ALREADY_EXISTS unless
allowOverwrite is set, and any one failure reports every other requested
version as SKIPPED rather than performing a partial copy. versionRevisions
is checked against the source's actual revision (MISMATCHED_REVISION on a
mismatch). Maven, npm, pypi, and nuget are not yet bridged, the same
restriction PublishPackageVersion already has for those formats, and are
documented as a known limitation.
Slice 10 of #4542.
BedrockProxyIntegrationTest, BedrockProxyPassthroughIntegrationTest,
and the cancellation and logging pair ran on three profiles between
them. They now share BedrockProxyBackendProfile: the proxy backend on
one stand-in port, the API key, the model mapping, and passthrough on.
Each override only reaches the classes that test it. Only the stand-in
in BedrockProxyIntegrationTest reads the Authorization header. The
other classes call model ids the mapping does not name, and every call
in BedrockProxyIntegrationTest names the mapped id, which the mapping
resolves before passthrough is consulted.
The one test that needs passthrough off,
converse_noMappingNoDefaultNoPassthrough_returns400, moves to
BedrockProxyTimeoutIntegrationTest, whose profile leaves passthrough
off and sets no default model. The issue had the timeout class joining
the shared profile too. It stays apart: its one-second request timeout
would also close the upstreams the cancellation tests stall before
their headers, so those tests would pass without a disconnect closing
them.
The new profile's javadoc lists each override, the classes that rely
on it, why it is inert for the others, and why the timeout class stays
apart. The moved classes gain or update a class javadoc saying what
they get from it.
Under IAM enforcement an S3 object operation was checked only as its own
action. A PutObject, CopyObject or CreateMultipartUpload that set tags,
an ACL, a retention period or a legal hold needed only s3:PutObject,
GetObjectAttributes needed only the read, and a retention change or a
delete asking to bypass governance retention needed no
s3:BypassGovernanceRetention. No Object Lock condition key was offered.
Each now also needs the actions the S3 user guide's permissions table
and the API references require besides its own. An object creation
needs the action of each setting it applies: s3:PutObjectTagging,
s3:PutObjectAcl, s3:PutObjectRetention or s3:PutObjectLegalHold. A copy
under the default COPY tagging directive keeps a tagged source's tags,
so it needs s3:PutObjectTagging too, checked where the source is read
against the request's credential, a presigned URL's included, and it
offers no request tag keys from the x-amz-tagging header it ignores.
GetObjectAttributes needs s3:GetObjectAttributes, or
s3:GetObjectVersionAttributes for a version. A PutObjectRetention or
DeleteObject that sends x-amz-bypass-governance-retention needs
s3:BypassGovernanceRetention; an annotation delete does not, as the
user guide says the permission does not apply to annotation operations.
s3:PutObject, s3:PutObjectRetention and s3:PutObjectLegalHold are
offered the Object Lock keys from the request's headers or body, and an
object creation offers its tag and Object Lock keys to each extra action.
A denial names the missing permission, and CloudTrail records the
operation that was refused, PutObjectRetention and GetObjectAttributes
included. Generated presigned URLs refuse all four creation settings,
as they refused tags.
Refs #5716
A Query request without a usable credential scope is routed by its
Action and Version, and IAM enforcement authorizes it under the service
that routing picks. The names each service routed were kept by hand in
AwsQueryController and had drifted from what the services serve: 170
names Floci dispatches, across eight services, reached no service and
fell through to SQS. They answered UnsupportedOperation in SQS's
namespace and were authorized as SQS actions.
Each Query service's API versions and operations now come from its
botocore models: tools/aws/regen_query_services.py writes them, from the
pinned botocore, to aws/query-services.json, and make aws-data-check
fails when the file is stale. Every name a service defines reaches it,
implemented here or not. Floci keeps the list of services and their
order, Cognito's names, which no Query model holds, and ElastiCache's
ValidateIamAuthToken, which no model defines.
A name several services define goes to the first of them when the
request names no Version. Ten such names get a pinned owner instead,
the service that serves them here, where the order would pick an
earlier one that does not. The routing parity test checks every
dispatched action with and without a Version and no longer needs its
list of known gaps.
* fix(apigateway): refuse a long-term access key sent with a session token
AWS answers 403 "The security token included in the request is invalid"
when a long-term key comes with X-Amz-Security-Token, signed or not. The
same message without the period answers a temporary key with a wrong token.
The session token check moves to core.common.auth, and Lambda Web IamAuth
uses it too.
Closes#5858
* fix(apigateway): read the session token where the signature is and refuse an empty one
AWS ignores a token in the query of a header-signed request and a token
header on a presigned one. It refuses an empty token with any key.
* fix(cognito): forward SignUp ValidationData and ClientMetadata to the pre-signup trigger
Real Amazon Cognito delivers the SignUp request's ValidationData and
ClientMetadata to the pre-signup Lambda trigger as request.validationData
and request.clientMetadata (see the pre sign-up trigger docs). The SignUp
path parsed only UserAttributes and called signUp without them, so
firePreSignUp always received empty maps — unlike AdminCreateUser, which
already parses and forwards both fields. The auto-confirm PostConfirmation
firing dropped ClientMetadata the same way.
Parse both fields in handleSignUp and thread them through signUp →
signUpWithReservedUsername → firePreSignUp, mirroring the AdminCreateUser
plumbing, pass ClientMetadata on to PostConfirmation when PreSignUp
auto-confirms, and cover both with JSON-handler-level regression tests.
Adapted to #5783's signup restructure (callers of signUp in its new tests
pass explicit empty maps).
* refactor(cognito): extract name/value pair parsing helper
The Name/Value forEach loop was copied six times across AdminCreateUser,
AdminUpdateUserAttributes, SignUp and UpdateUserAttributes. One
readNameValuePairs helper next to readStringList now serves all six.
* fix(cognito): forward ClientMetadata to CustomMessage trigger sources
fireCustomMessage hardcoded an empty clientMetadata map. It now takes the
calling action's metadata so SignUp can pass the request's ClientMetadata
to CustomMessage_SignUp, as the developer guide lists for that source.
The other sources keep an empty map: ResendConfirmationCode and
ForgotPassword do not accept ClientMetadata at all yet, and the guide
excludes InitiateAuth-family metadata from custom message requests, so
the MFA and OTP CustomMessage_Authentication paths deliberately pass
none. Regression test asserts CustomMessage_SignUp receives the signup
metadata.
* fix(ses): check v2 contact request bodies against the service model
CreateContactList, UpdateContactList, CreateContact, UpdateContact and
ListContacts read their members by hand. A Topics or TopicPreferences
value that was not an array was a Floci-specific BadRequestException,
and a topic or preference member of the wrong JSON type was read as its
text, so it reached the enum and name validation instead of failing
deserialization as on AWS.
These operations now check their body against the SES v2 shapes right
after the JSON object check, like the send operations. The first member
of the wrong JSON type, in body order, is a SerializationException with
AWS's deserializer message, ahead of the name validation, the page size
and the contact list lookup. The type checks this makes unreachable are
removed, including the hand-built AttributesData messages, which the
walk now produces through the shared helper. UnsubscribeAll and
UseDefaultIfPreferenceUnavailable keep their boolean coercion, and
PageSize its integer check.
* docs(ses): note the null contact topic element deviation
A null element of Topics or TopicPreferences passes the SES v2 shape
check like a null address element, but SES then answers it with a 500
InternalFailure. Floci keeps a 400 BadRequestException naming the
element. The request member types section only described the address
case, "as on AWS", so it now says that this one deviates.
* fix(dynamodb): report an empty or mistyped ExclusiveStartKey value the way AWS does
* refactor(dynamodb): share the key value error builders between writes and start keys
* fix(dynamodb): brace the Scan start key early return and pin the index key wording
Floci issued six digits for every code. Measured on AWS (eu-west-1,
2026-10-16), through a Custom Email Sender that printed what Cognito
handed it: the USER_AUTH EMAIL_OTP sign-in codes were 06988020, 50415180
and 81488702, eight digits, while the sign-up, resent, forgotten-password,
UpdateUserAttribute and VerifyUserAttribute codes had six. A client that
checks the length, or a test that reads the code from a message, sees the
difference.
Only the email sign-in code changes. MFA codes (SMS_MFA, EMAIL_MFA) and
SMS_OTP keep six digits: they were not measured, and nothing here
guesses. The Cognito tests now read codes through one CognitoCodes
helper, in place of the six copies of the same extraction they carried.