* fix(ses): answer SES v2 wire-type errors with AWS's messages
A scalar for a map member is "Expected map or null", a string, boolean,
object or list for an integer member gets the Integer conversion message,
and a number is narrowed to an int the way AWS reads it (1.5 is accepted,
a value above the int range saturates before the range check). A body that
is not a JSON object is a SerializationException instead of a BadRequest.
* test(ses): give the new SES v2 tests their own order and share the non-object bodies
* fix(lambdaweb): let heap flags in NODE_OPTIONS replace the defaults as AWS does
AWS drops both of its heap flags when NODE_OPTIONS names
--max-old-space-size or --max-semi-space-size, and puts those on the
command line in their place. Floci kept its own flags, so a larger heap
set in NODE_OPTIONS lost to --max-old-space-size=1024.
* test(lambdaweb): copy a quoted heap value from NODE_OPTIONS as AWS does
AWS puts --max-old-space-size="1536" on the node command line with its
quotes. Node refuses that value, so the start fails with
Runtime.ExitError.
* docs(lambdaweb): put the NODE_OPTIONS sentences after the require.main one
* test(lambdaweb): share the default heap flags in the NODE_OPTIONS tests
Initialize and route qualifier-owned provisioned environments without invoking handlers during initialization. Keep configuration outcomes committed while failed removal remains owned for retry, and bound cleanup after late invocation release. Preserve on-demand spillover and the separate alias-retargeting stage.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
DSQL evaluates a cluster's resource-based policy when a client connects
(measured, eu-west-1): an explicit Deny that applies to the caller refuses
the connection with the hint "User: <caller> is not authorized to perform:
dsql:<action> on resource: <cluster ARN> with an explicit deny in a
resource-based policy", under the statement's conditions, aws:PrincipalArn
and aws:SourceIp among them, and a statement that does not apply leaves the
caller's own policies to decide. With IAM enforcement on, the endpoint
checked only the caller's identity policies.
DsqlResourcePolicyProvider supplies a cluster's policy through
ResourcePolicyProviders, as the SNS and Lambda providers do, and the
endpoint evaluates it with the caller's policies and SCPs as
LambdaTaskAuthorizer and LambdaWebIamAuth evaluate a function's policy:
evaluateResourcePolicyFor, then evaluateResolvedResourcePolicy, with the
client's address as aws:SourceIp. With enforcement off nothing is
evaluated, as for every other policy in Floci.
DsqlService already built the cluster policy's context for the lockout
check and the "is not authorized" sentence for the tag refusals; both now
come from DsqlPrincipals (policyContext, notAuthorized), which the endpoint
uses too, instead of a third copy.
The policy also governs control plane calls on DSQL (measured), but Floci's
IAM enforcement names DSQL's control plane resources as *, so that is left
as it is.
A bucket with Object Lock is versioned for good. PutBucketVersioning
with Suspended on such a bucket now answers 409 InvalidBucketState and
leaves it Enabled, and PutObjectLockConfiguration on a bucket whose
versioning is unset or suspended answers 409 InvalidBucketState and
enables nothing, matching the AWS-recorded messages. CloudFormation goes
through the same PutBucketVersioning path, so an update that suspends a
locked bucket rolls back.
Both checks run with the write under the bucket monitor, and CreateBucket
with Object Lock now enables versioning and the lock in one step, so no
concurrent request can leave a locked bucket suspended.
Buckets stored in either state by an earlier release load as they were;
the null-version protection for them is unchanged, and its tests now set
that state on the stored bucket.
TagResource, UntagResource and ListTagsForResource now take job run ARNs
(.../applications/<id>/jobruns/<id>), which the model's ResourceArn
allows ("the supported resources are Amazon EMR Serverless applications
and job runs"). They work on the tags StartJobRun stores, so GetJobRun
reports the current set, under the same rules as an application's: at
most 50 tags, no "aws:" prefix. An ARN must be the run's own, so one of
another application or account names nothing, and once an application
is deleted its runs' ARNs name nothing, as its own ARN already does. A
session ARN, which the pattern also allows, now answers
ResourceNotFoundException rather than ValidationException, as sessions
are not emulated.
ListJobRunAttempts (GET .../jobruns/{jobRunId}/attempts) and GetJobRun's
attempt parameter report attempts. Nothing runs, so no run fails and
none is retried: every run is one attempt, number 1, created and updated
with the run. GetJobRun, ListJobRuns and ListJobRunAttempts carry it.
GetJobRun with attempt 1 or none returns the run; another attempt
answers ResourceNotFoundException, in Floci's words, as no source shows
AWS's answer for an attempt a run never made, and leaves the run as it
was.
Also from the #6202 review:
- From release emr-7.11.0 a BATCH run's executionTimeoutMinutes must be
1 to 10080. The model: "the maximum value is 10080 minutes (7 days)
starting with Amazon EMR release 7.11. Setting a value of 0 to disable
the timeout is no longer supported for BATCH mode job runs." Earlier
releases and STREAMING runs keep 0 to 1,000,000. No source gives the
error; ValidationException, in Floci's words. The check runs before
auto-start, under the application's lock, so a refused run leaves the
application as it was.
- ListJobRuns refuses a state or mode that does not exist and more than
8 states, and ListApplications a state that does not exist and more
than 7, with the framework ValidationException. A typo listed nothing
before. ListApplications' maxResults outside 1 to 50 now answers the
same framework message, joined with any states violation.
- EmrServerlessRegionIntegrationTest uses EmrServerlessRequests, which
gains tagsPath, and pins a job run ARN across Regions;
EmrServerlessTagIntegrationTest moves onto the same helpers.
The enum and range violations are now SmithyValidationErrors.notInEnum,
notAllInEnum and outOfRange, which EMR Serverless uses.
Part of #6046 (part 9).
Add the requested control-plane stage: Put/Get/Delete validation, persistent desired configuration, qualified IAM resources, and cleanup on version, alias, and function deletion. Share the function concurrency lock with reservation changes. Runtime initialization and invocation routing remain separate.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The ninth and last operation of IAM temporary delegation, and the last one the
model publishes that is not an M3 404: a delegation request now comes back as a
Markdown summary instead of UnsupportedOperation, which takes IAM to 177 of the
180 operations botocore 1.43.113 publishes.
AWS generates that text with a large language model, so this is the one piece of
the family that cannot be its answer. What is sourced is the format, the
reference's own example answering "Human readable summary in Markdown format",
and the shape: EntityArn 20 to 2048, Locale 2 to 12, SummaryContent up to 10000
characters and the four SummaryState values. Every line is read off the record,
so one request summarizes the same way twice: what is being asked for, by whom,
for how long, and where it has got to. The services and actions the console
credits its AI summary with are the one half missing, for the same reason
nothing renders a PermissionPolicy here, that no API registers the template AWS
resolves one from, so the template and its parameters are named instead.
Who may read a summary is who may read the request, which the reference states
outright, so the lookup is GetDelegationRequest's and so is the NoSuchEntity it
answers. The request is authorized against the ARN Floci mints around the id
EntityArn names, which is the one its five by-id siblings already resolve: a
policy naming one request authorizes that request alone, and a deny on it holds
however the caller respells the ARN. An ARN of another service names no request
of IAM's to summarize.
Four answers are chosen rather than read, each recorded in docs/services/iam.md:
an ARN of another entity type is NOT_SUPPORTED, a locale Floci does not write is
NOT_AVAILABLE with no content, a value that is no ARN at all is the modeled
InvalidInput, and an id inside a well formed ARN that no id could match is
NoSuchEntity rather than a constraint failure.
The text is the requester's, and the summary is Markdown, so it is escaped
rather than passed through: the model lets a description, a message and a
parameter value carry newlines and backticks, which would otherwise forge a
heading, a bullet or a code span inside a document read as Floci's own account
of the request. A parameter value the record does not hold is left out, and an
indexed value arriving as a key with nothing under it is no longer stored as
one.
* fix(ec2): skip addresses stored resources hold when the VPC network allocates
The VPC network's allocator reads only its lease table, but a launch that
names an address while a failed launch is still giving it back keeps the
address without a lease, and so does a network interface created with its
own address. assignPrivateIp now asks for another address while the one it
got is held by a stored instance, network interface or NAT gateway in any
account, so a later launch's Docker attach no longer fails on an address
that is already in use. The addresses it walks past are given back once it
is done, since their holders took no lease of their own.
Closes#6283
* fix(ec2): keep the fallback off addresses the VPC network walk skipped
When the walk past held addresses runs the Docker-backed allocator dry,
the synthesised fallback checked only the caller's account, so on a shared
default subnet it could hand out the address another account's resource
holds. It now skips the addresses the walk found held as well.
* test(ec2): share the mocked-network and RequestContext setup in Ec2ServiceTest
requestContexts builds the RequestContext CDI mock that four helpers and
tests each built for themselves, and mockedVpcNetworkService replaces the
mock-mode new Ec2Service(..., vpcNetworks) the private-address tests
repeated. The comment on why jakarta.enterprise.inject.Instance is written
out in full lives in requestContexts.
* feat(dynamodb): journal per-table items one record per item in wal mode
With the per-table item layout, wal mode still kept the single-file
WalStorage, whose log record for any item write is the whole table and
whose compaction rewrites a snapshot of every table.
Give the partitioned item store a journal mode for wal. Each write
appends one record per changed item to dynamodb-items/journal.wal, and
compaction, on the WAL compaction interval, rewrites only the shards
changed since the last one and then empties the journal. Load replays
the journal over the shard files.
- Writes hold off compaction while they change memory and append their
record, so the journal never drops a record whose change is not yet
in a shard file; compaction waits until load has replayed the journal
- A change the journal cannot take is compacted into its shard at once,
and the write fails if that fails too
- Replay stops at a torn or unreadable record, including one that
decodes to null, and cuts it off
- A journal that cannot be emptied is reopened, so later writes are
still appended
Part of #6293
* fix(dynamodb): journal changes to one key in the order they were applied
Changes held only the shared side of the compaction lock, so a second
write to the same item could update memory after the first and still
append its record ahead of it. Replay follows the journal, so a restart
before compaction restored the older value.
Hold a per-key lock across the in-memory update and the journal append.
Changes to different keys commute and stay concurrent.
* fix(dynamodb): stop appending to a journal after a failed write
A failed append could leave part of its record in the file while the
writer stayed open. If the fallback compaction also failed, the next
append succeeded behind the torn record, and replay cut it off with it,
losing a write the caller saw succeed.
Close the writer when a write fails, so every later change falls back to
compaction until a compaction replaces the file and reopens the journal.
* fix(dynamodb): treat a journal key that is not UTF-8 as unreadable
Replay decoded keys leniently, so corrupt key bytes became U+FFFD and
the record was applied to a different key, then kept by the next
compaction.
Decode journal strings with a strict UTF-8 decoder and end replay at a
record whose key or entry key does not decode, like any torn record.
* fix(dynamodb): fail load when the journal cannot be read
Replay logged an I/O error (or a failure to read the journal's size)
and returned normally, so load marked the store ready with records left
unapplied. The next compaction then wrote the partial state to the shard
files and emptied the journal, deleting writes that had been
acknowledged.
Replay now throws on any failure other than a torn or undecodable tail,
and load turns that into a startup failure that leaves the journal
untouched, as a failed migration does. A directory where the journal
goes still counts as holding no records.
* fix(dynamodb): fold a leftover wal journal when per-table runs in another mode
Only wal mode read journal.wal. A wal-mode run that ended without
compacting left its changes there, and a restart in persistent or
hybrid mode ignored them: they were lost, and a later return to wal
replayed them as stale changes over newer shard files.
On load in another mode, replay a non-empty journal.wal, write the
shards it changed and remove it. Fail to start, keeping the file, if a
shard cannot be written or the file cannot be removed.
* feat(dynamodb): opt-in per-table item files, split into shards
Every table's items live in one dynamodb-items.json, and any item write
rewrites all of them. A small table that changes often, such as a node
heartbeat table, then keeps rewriting every large table beside it.
Add an opt-in item layout. With item-layout: per-table, items are stored
under dynamodb-items/ as item-shards files per table, and a write saves
only the items it touched:
- persistent rewrites the one shard file that holds the item before the
write returns, and fails the write when that file cannot be written
- hybrid marks the shard dirty and writes dirty shards on the flush
interval; an explicit flush or shutdown reports shards it could not
write
- wal keeps the single-file layout for now and logs a warning
The default, single-file, is unchanged.
On first start, an existing dynamodb-items.json, or a wal snapshot and
log, is migrated through a staging directory moved in place in one step
and then renamed .migrated; a failed migration stops startup and leaves
the old files untouched. DynamoDbService writes single items through the
new MapEntryWriter, and the TTL sweeper removes each item under its item
lock.
Part of #6293
* test(storage): skip read-only directory tests where POSIX permissions are missing
* fix(s3): preserve archived null versions
* fix(s3): address null version archive review
Preserve locked null versions under new versions and markers while checking protection before suspended cleanup. Avoid locking never-versioned body reads, reject reserved service keys, and recover original null bodies and metadata after failed publication.
Remove obsolete marker bodies and retry reads that race marker creation. Refresh promoted null generations so archival and configuration rollback cannot hide a body replacement.
* fix(s3): serialize null version metadata updates with promotion
Hold the bucket monitor while resolving, validating and persisting retention, legal hold and ACL changes so promotion cannot discard an acknowledged update. Cover the race with a two-thread regression and preserve numbered-version references during demotion.
* fix(analysis): protect null history after bucket configuration rollback
Apply archived-null protection and cleanup in every non-enabled mutation path so restoring an unversioned bucket configuration cannot erase locks or leave stale history. Cover replacement, deletion and protected annotations in memory and disk modes.
* fix(analysis): assert preservation immediately after each denied operation
Check current and archived bytes before another request can repair corruption, use a distinct copy source, and compare replacement metadata with the listed null entry.
* fix(analysis): compare listed null history with replacement metadata
Assert the null listing identifies the latest replacement and its ETag so stale history cannot satisfy the count-only check.
* fix(analysis): qualify missing null version documentation
Describe keys that have no null version without excluding keys that gain one after versioning is suspended.
* fix(s3): retain archived null history until replacement publication succeeds
Keep the archived body, metadata and annotations when a non-enabled replacement metadata write throws, including after configuration rollback. Clean history after successful publication under the bucket monitor and cover failures before and after publication in memory and disk modes.
* fix(s3): restore the current pointer after archived null publication failures
Recover the prior current body and metadata when a non-enabled PUT with archived null history fails publication. Handle numbered versions, promoted null versions and markers with a fresh read generation, and keep archive annotations publicly associated with their original version. All 199 focused tests pass.
* test(s3): prove reads retry across failed publication recovery
Observe replacement bytes during a publication fault and require latest and explicit-null reads to retry against the restored promoted null version. Both new cases and all 27 archive/read tests pass.
* docs(s3): use repository punctuation style
Replace existing em dash punctuation in the touched S3 service documentation as required by the repository documentation rules.
* fix(analysis): assert canonical cleanup when failed publication restores a marker
Check memory payloads and the disk canonical path before retrying, so the marker-before-publication cells detect orphaned replacement bodies as well as metadata restoration. All 27 archive/read cases pass.
Close admission during drain and retain failed removal ownership. Retry late releases within a separate bounded cleanup attempt, validate drain configuration at startup, and safely reopen after reset.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(firehose): retry failed Redshift COPY loads every five minutes
Retry failed Redshift loads oldest-first against the staged object every 5 minutes until RetryOptions.DurationInSeconds has passed, preserving the staged batch in S3 and dispatching retries to the delivery executor.
* fix(firehose): harden Redshift staged COPY retries and queue concurrency
- Throttle pending COPY drain tasks per stream using single-flight execution
- Check retry window expiration before executing subsequent COPY attempts
- Measure retry backoff interval from failure completion rather than attempt start
- Atomically enqueue pending batches to prevent detached queues during empty cleanup
- Stop draining immediately if the stream is deleted
* fix(firehose): drop pending Redshift COPY retries if destination is removed
* fix(firehose): measure retry window from attempt start and consolidate retry tests
* docs(firehose): clarify Redshift retry window starts with first attempt
DSQL's own connectors, and libpq's and pgjdbc's sslnegotiation=direct, start
TLS at once with no SSLRequest. The endpoint read their ClientHello as a
plaintext startup packet and refused it as not TLS.
The endpoint now reads a connection's first byte. A TLS handshake record goes
straight to the handshake with that byte handed back, and anything else takes
the SSLRequest path as before. The byte is TlsProxyServer's TLS_HANDSHAKE, now
public, the one the TLS proxy already tells TLS apart by; its peek runs on a
Vert.x socket, the endpoint's on a blocking one, so only the constant is
shared.
As DSQL does (measured, eu-west-1): the endpoint picks the ALPN protocol
postgresql whenever a client offers it, after an SSLRequest too, and none
otherwise; a direct handshake that does not end with postgresql picked
completes and the connection closes without a message.
DsqlWireClient opens TLS through one handshake helper, with an ALPN list,
after an SSLRequest (tls) or at once (direct), and signs in separately.
A Task can now use the optimized EMR integrations the Step Functions
guide lists: createCluster, setClusterTerminationProtection,
terminateCluster, addStep, cancelStep, modifyInstanceFleetByName and
modifyInstanceGroupByName, with .sync for createCluster, terminateCluster
and addStep. Each calls Floci's EMR in the state machine's Region under
the guide's field names: ClusterId for JobFlowIds or JobFlowId, a single
Step or StepId, and the instance fleet or group found by name through
ListInstanceFleets or ListInstanceGroups. They failed with "Unsupported
resource" before.
A .sync Task records TaskSubmitted with the call's result and polls
DescribeCluster or DescribeStep under the Task's TimeoutSeconds and the
execution's budget, as ecs:runTask.sync does. Its result is the describe
response with the call's result after it, which is the createCluster.sync
output recorded on AWS (Cluster, then ClusterId). A step that ends FAILED,
CANCELLED or INTERRUPTED, or a cluster that terminates before WAITING,
fails the Task with States.TaskFailed and the describe response as the
cause. A wait that ends early cancels the step of an addStep.sync; a
cluster is left running, as the guide says Step Functions does.
An EMR error is named after the SDK exception class under EMR.:
InvalidRequestException and InternalServerException keep their names,
and any other code is EMR.AmazonElasticMapReduceException, as AWS reports
a ValidationException. createCluster refuses
KeepJobFlowAliveWhenNoSteps other than true and Steps, as the guide
requires, with States.TaskFailed and the guide's wording for each rule.
A Task without the ClusterId its API acts on, a cancelStep without a
StepId and a ByName request without its name fail the same way.
AddJobFlowSteps on an unknown cluster, or on one in another Region, now
answers ValidationException "Specified job flow ID does not exist.", as
AWS does: a botocore ClientError (raster-foundry/raster-foundry#352) and
a CloudTrail record on AWS re:Post show it. It answered DescribeCluster's
InvalidRequestException. That re:Post record is an addStep.sync failing
on an unknown cluster with EMR.AmazonElasticMapReduceException, which
addStep now reports as well.
ModifyInstanceGroups and ModifyInstanceFleet on a terminated cluster,
which modifyInstanceGroupByName and modifyInstanceFleetByName reach, now
answer as AWS does too: ValidationException "An instance group may only
be modified when the cluster is running or waiting."
(hashicorp/terraform-provider-aws#1355 and hashicorp/terraform-provider-aws#9400)
and InvalidRequestException "A job flow that is shutting down,
terminated, or finished may not be modified." with ErrorCode
INVALID_JOB_SHUT_DOWN (hashicorp/terraform-provider-aws#31375). Both answered InvalidRequestException "Cluster <id> is
terminated.", which no AWS response shows, and EMR's error body now
carries an error's extra members such as ErrorCode.
TerminateJobFlows, the four Set* cluster setters and CancelSteps now
refuse a request without a member their model requires (JobFlowIds and
the setting, or StepIds) with AWS's framework ValidationException, as
RunJobFlow does for Name. They read a missing list as empty and a missing
setting as its default and answered success, which the
setClusterTerminationProtection and terminateCluster integrations reached
too. The "Member must not be null" violation is now one helper in
SmithyValidationErrors.
Part of #6046 (part 10).
Floci dispatched the five operations that turn centralized root access on
and off and nothing that uses it, so the feature was half emulated:
AssumeRoot, the operation they exist for, answered UnsupportedOperation. The
five took no caller check of their own either, so any account could enable
or disable organization wide root features, and the record they wrote was
scoped to the calling account, which left the management account's toggle
invisible to a delegated administrator.
All five answer for one organization now, so all five check the caller, and
each refusal is a shape the reference models on them and on nothing else: no
organization is OrganizationNotFound, one without All features is
OrganizationNotInAllFeaturesMode, one without trusted access for IAM is
ServiceAccessNotEnabled, and a caller that is neither the management account
nor a delegated administrator is
AccountNotManagementOrDelegatedAdministrator. The two enable operations add
CallerIsNotManagementAccount, modeled on them alone, so a delegated
administrator may read the features and turn them off but not on. The
feature set belongs to the organization, so it is read and written in the
management account's scope whoever asks, and the OrganizationId the model
declares beside EnabledFeatures is answered now that the organization is
known. Organizations answers all of this through a provider interface in the
iam package, the way ScpProvider already does, so IAM still does not depend
on it.
AssumeRoot opens the session those features allow. It acts as the member
account's root user, which no identity policy grants or denies, scoped by
the TaskPolicyArn the request names: the five AWS managed policies the model
names, under the root-task path, each denying everything it does not name,
so the policy is the whole of the bound and is read beside the root's own
allow-all rather than as a session policy with nothing to allow. A customer-
managed policy can carry that path too and is refused, being the caller's
own document rather than one of AWS's. The caller must be able to manage
root access and have RootSessions enabled, the target must be a member
account other than the management account, and the audit reads those
policies allow name the member account's root user when they carry no
UserName, which is what their own arn:aws:iam::*:root asks for.
What is chosen rather than read is documented in docs/services/sts.md: the
operation models only RegionDisabled and ExpiredToken, so every caller,
target and feature refusal is AccessDenied 403 and a task policy outside the
root-task path is a ValidationError, the shape MinimumSessionTokenSize also
answers outside the 0 to 4096 the model declares for it, the size asked for
being the size issued. The guide's refusal of root user credentials covers
both credentials this emulator reads as the account root, one that resolves
to a root ARN and the bare account-id key the enforcement filter calls
floci's account-root principal, so a privileged session is opened by an IAM
user or role of the management account as it is on AWS. The global endpoint
is refused when the request arrives on that host, which is the only way a
request says so.
Under IAM enforcement a request that passes a role to a service needs iam:PassRole on that role,
but no Redshift or Redshift Serverless operation was checked for it. A caller allowed to create a
cluster or change its roles could attach any role to it, and Floci's COPY, UNLOAD and Spectrum
statements then run as that role; statements run through the Data API on a Redshift Serverless
workgroup can use its namespace's roles the same way.
Now checked, with iam:PassedToService as the Service Authorization Reference gives it:
- Redshift CreateCluster and RestoreFromClusterSnapshot pass the roles in IamRoles, and
ModifyClusterIamRoles those in AddIamRoles, to redshift.amazonaws.com. The lists are read through
the Redshift handler's own member pattern, so IamRoles.IamRoleArn.N, as the SDK sends it,
IamRoles.member.N and IamRoles.N all count. RestoreFromClusterSnapshot is checked although
Floci's restore attaches no role yet, as AWS checks it.
- Redshift Serverless CreateNamespace and UpdateNamespace pass the roles in iamRoles and the one
in defaultIamRoleArn, and CreateScheduledAction and UpdateScheduledAction pass roleArn, to
redshift-serverless.amazonaws.com.
The Redshift management guide: "To associate an IAM role with a cluster, a user must have
iam:PassRole permission for that IAM role." A role named only as a cluster's default,
DefaultIamRoleArn, is not checked on its own: the default is one of the roles the cluster holds, and
Floci does not act on it. A namespace's defaultIamRoleArn is checked, since Floci keeps it whether
or not iamRoles holds it.
COPY, UNLOAD and Spectrum now take a role only under the ARN IAM holds it under, path included, as
STS AssumeRole does. They looked the role up by its name alone, so a cluster given
role/sandbox/AdminRole, which a PassRole grant on role/sandbox/* allows, ran its statements as the
AdminRole IAM holds under another path.
IAM's AddRoleToInstanceProfile now passes the role it adds to ec2.amazonaws.com. Every instance
running with the profile gets that role's credentials from the instance metadata service, so adding
a role to a profile already attached to a running instance handed it any role. The IAM API
reference: "The caller of this operation must be granted the PassRole permission on the IAM role by
a permissions policy." RoleName names the role without its path, so the check uses the ARN IAM holds
the role under, or, for a role IAM does not hold, the ARN the name gives.
docs/services/iam.md lists the new operations, and docs/services/redshift.md the path rule.
DSQL knows the cluster only by the TLS server name, and refuses a connection
that sends none with FATAL 08P01 "unable to accept connection, sni was not
received" once its password is in, whatever the password (measured). The
endpoint fell back to the host in the token and let such a connection in. It
now refuses it as DSQL does, and admit takes the cluster from the server
name alone. The integration tests connected to 127.0.0.1 through pgjdbc's
NonValidatingFactory and sent no server name; DsqlClusterFixture now gives
pgjdbc a NonValidatingFactory that names the cluster, as the compatibility
test's factory does.
* fix(ssm): honor path parameter type filters
Forward GetParametersByPath Type filters through the existing parameter-filter validation and matching rules. Retain path, recursion, region and public AMI selection, and document the remaining filter and pagination limitations.
* fix(ssm): validate path filter keys and apply key ids
Reject missing and action-invalid filter keys before selecting path results. Reuse the existing Type and KeyId matcher, and validate Label options while keeping label matching a documented gap.
Verify 264 focused SSM tests, Checkstyle, 95 docs tests, docs checks, and the partition gate. Regression tests fail before the fix and detect an inverted key allowlist.
* fix(ssm): reuse canonical invalid filter option errors
Share the existing AWS InvalidFilterOption message between DescribeParameters and Label path filters. Assert the complete HTTP message for invalid KeyId and Label options.
Verify 264 focused SSM tests, three CI-failing Lambda/SQS tests, Checkstyle, docs checks, 95 docs tests, and the partition gate. The two Label message assertions fail before the fix.
* fix(dsql): refuse a startup packet or client message outside DSQL's limits
The endpoint took a client message up to 64 MB and dropped the connection
without a word past that; DSQL takes 10 MiB and answers FATAL 08P01
"invalid message length" as soon as a longer, or shorter than 4, length
arrives. Measuring the startup packet alongside showed it one byte off as
well: DSQL takes 9,999 bytes and answers "invalid length of startup packet"
from 10,000, where the endpoint took 10,000 and refused more in silence. Both
are DSQL's now, for the startup inside TLS, the password message and every
message after signing in. What the database sends is not DSQL's to limit, so
it is still read up to 64 MB. PostgresWire.checkedLength throws its own
InvalidLengthException, still an IOException, so a reader can tell such a
packet from a broken connection; the RDS proxy and Redshift's bridge end the
connection on it as before.
* fix(dsql): refuse any packet before TLS as not TLS, whatever its length
The first head capped the packets read before TLS at the startup limit too,
so a 10,000-byte plaintext startup packet, first or after a GSSENCRequest,
closed the connection in silence where it had been refused as not TLS; above
10,000 bytes main closed in silence as well. Measured on DSQL, it reads no
more than such a packet's length and code: a plaintext startup packet of any
length is refused with "SSL is mandatory", and one under 8 bytes ends the
connection without a word. The endpoint now reads the body only when it fits
a startup packet, so the refusal reaches the client in order, and refuses a
longer one unread.
The EC2 image catalog carries the SUSE family (SLES, SLES for SAP, SUSE
Multi-Linux Manager and openSUSE Leap) and the Red Hat family (RHEL and
Rocky Linux) under their publishers' owner ids. DescribeImages finds each
by owner and name.
Document opt-in TLS and the default port 443 listener for packaged Node.js handlers that hard-code HTTPS callbacks. Preserve certificate verification and clarify the unchanged HTTP ResponseURL and inline module behavior.
Verify 51 existing focused callback, TLS-port, endpoint, and CA-bundle tests, Checkstyle, docs checks, 95 docs-tool tests, and the partition gate. No runtime code or configuration defaults change.
* fix(apigateway): answer an HTTP API proxy result without a Content-Type as text/plain
Measured on AWS (eu-west-1, 2026-10-19): an HTTP API answers a Lambda proxy
result that carries a body and no Content-Type header of its own with
text/plain; charset=utf-8, in both payload formats. Floci fell back to
application/json, the REST API's default, so a client that trusts the
header read a plain body as JSON.
The fallback now follows the API kind: an HTTP API answers text/plain, a
REST API keeps answering application/json.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(apigateway): fold the Content-Type cases into the inference test
The three cases repeated the inference test's setup, route helper and
cleanup, so they join it: two results without a Content-Type in the two
payload formats, and one that names application/json. The docs say a
statusCode and a body, since a format 2.0 result without a statusCode
still takes the inferred JSON path, and the compatibility test's get
helper and parameterized name are back on one line each.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* feat(lambdaweb): accept code up to 512 MiB and refuse more as AWS does
AWS takes a Web Function package of up to 536870912 bytes, zipped and
unzipped. A larger object is a 400 ValidationException at creation. A zip
whose files add up to more gives a Failed revision.
* fix(lambdaweb): add the declared sizes as unsigned numbers like AWS
AWS adds the sizes as unsigned 64-bit numbers and stops at the largest
one. A zip that declares sizes past the signed range is Failed too.
* test(lambdaweb): declare the large sizes instead of writing them
Adds StartJobRun, GetJobRun, ListJobRuns and CancelJobRun under
/applications/{applicationId}/jobruns. Job runs are metadata only, like
Glue's: a run is RUNNING from submission and settles when read. With the
new floci.services.emrserverless.job-run-duration-seconds at its default
of 0, a BATCH run is SUCCESS as soon as it starts; a positive duration
keeps it RUNNING that long, and a run that would outlast its
executionTimeoutMinutes (720 when not given) is CANCELLED at the
timeout. A STREAMING run stays RUNNING until it is cancelled.
A run on a CREATED or STOPPED application starts it, as auto-start
defaults to on; with auto-start off the run is refused. clientToken is
the idempotency token: a retry returns the original run, and the same
token with another request answers ConflictException "Request did not
match the original". CancelJobRun on a finished run answers
ValidationException "Job run is not in a cancellable state". ListJobRuns
returns the newest runs first, filtered by states, creation time and
mode, and its nextToken resumes only the listing it came from. A run
needs a jobDriver that sets exactly one of sparkSubmit and hive, as
GetJobRun's JobRun always carries one, and tags are checked before
auto-start, so a refused run leaves the application as it was.
createdBy is the caller's ARN.
Application createdAt and updatedAt now go out as epoch seconds, the
restJson1 default for the model's Date shape, as job runs do. They were
epoch milliseconds, which the Java SDK reads as the year 58774 and
botocore refuses as out of range. Auto-start rewrites updatedAt, so a
run's own submission reached the bug. Applications persisted with
millisecond timestamps read back at the same instant.
Part of #6046 (part 8).
Lists a package's versions with status, revision, and origin, the second of
the six missing list/lifecycle actions (ListPackageVersionAssets already
shipped). Scoped to all five formats from the start, matching real AWS: none
of the action's own format-field documentation carries a generic-only
restriction.
For generic, reads straight from the stored packageVersions records.
Container-backed formats (maven/npm/pypi/nuget) have no such record, so each
sidecar client gains a new RepositorySidecarManager.listPackageVersions
primitive: Reposilite's artifact-level directory listing plus each version's
own lastModifiedTime, Verdaccio's packument versions/time maps, pypiserver's
per-project JSON releases keys plus a HEAD on each version's file for
Last-Modified, and BaGetter's flat-container index.json plus the NuGet V3
Registration resource's catalogEntry.published (read only as an internal
timestamp source, not as a registration endpoint exposed to real NuGet
clients). Every container-backed version reports status Published, the same
convention DescribePackageVersion's own bridge already established.
Real-AWS behavior confirmed against the wire model and the User Guide before
writing any code: default page size is 50 (not the 100 this codebase's other
List actions use), sortBy=PUBLISHED_TIME is always applied (the only value
that enum has) most-recent-first, Archived and Disposed versions are excluded
unless the caller filters by that exact status (two sibling actions' own docs
name this operation as the one that hides them), Unlisted stays included by
default, and originType filtering to EXTERNAL/UNKNOWN always answers empty
since Floci never ingests from an external connection. defaultDisplayVersion
prefers npm's own dist-tags.latest, falling back to the most recently
published Published version for every format (the only stated rule for
Maven/PyPI; applied to generic/NuGet too as the best-justified inference,
since AWS states no rule for those two).
Verified live against all four real sidecar containers, not just mocks, with
new Docker-gated tests per format (Maven 26/26, npm 25/25, pypi 24/24, nuget
17/17 overall), plus the fast CodeArtifactServiceTest suite (210/210).
Checkstyle and docs-check clean.
Under IAM enforcement a REST request whose route no rule maps is let through unchecked. 51
operations of Lambda's function API had no rule, 25 of them served by Floci, so any signed caller
could read a function's configuration, environment variables included, publish versions, set its
concurrency and event invoke config, and create, read or delete layer versions and code signing
configs, with no Lambda permission at all. ListFunctionsByCodeSigningConfig, whose route ends in
/functions, was checked as lambda:ListFunctions.
Every operation of the function API now has a rule and is checked as the action of its own name,
as the Service Authorization Reference gives it, including the routes Floci does not serve yet:
provisioned concurrency, capacity providers, layer version permissions, the recursion, scaling and
runtime management configs, PutFunctionCodeSigningConfig, InvokeAsync, ListFunctionUrlConfigs and
the resource policy routes. IamRestRouteCoverageTest checks every operation of the lambda model,
as it does Scheduler, Pipes, MicroVMs and network connectors.
Each is checked against the resource the reference gives it:
- a function's settings against the function, as the other function routes are;
- an event source mapping against event-source-mapping:<uuid>, which DeleteEventSourceMapping now
gets too in place of *;
- a code signing config against code-signing-config:<id>, the id that ends the ARN the route takes,
in the request's account and Region, as Lambda looks it up;
- a layer version, its policy and its permissions against layer:<name>:<version>, the name as
given, even a name given as an ARN or holding an encoded /, since Lambda looks the layer up by it
as it is, and the version as the number Lambda parses, so 01 is checked as 1;
PublishLayerVersion against layer:<name>, and GetLayerVersionByArn against the version its Arn
names, its number read the same way;
- account settings, creating a config, and listing configs, layers or a layer's versions against
*, as they name no resource.
AWS also checks lambda:AddPermission, lambda:GetPolicy or lambda:RemovePermission for the resource
policy operations, and iam:PassRole for CreateCapacityProvider. Floci serves neither, so they are
checked as their own action alone.
docs/services/iam.md says which Lambda routes are mapped and what each is checked against.
IAM temporary delegation had no way out. The exchange token is answered by no
operation on the family, so a partner that filed a request could not obtain
what it exchanges, and NotificationChannel was stored with nothing reading it.
DelegationNotifier publishes the two notifications the user guide documents to
the SNS topic the request names, which is the channel AWS gives this feature.
Every state the guide's notification table lists notifies: ASSIGNED,
PENDING_APPROVAL, ACCEPTED, FINALIZED, REJECTED and EXPIRED, leaving only the
UNASSIGNED a request starts in, which the partner filed itself. FINALIZED
sends two, a StateChange and the ExchangeToken notification carrying the token
and an ExpiresAt of release plus SessionDuration. The payload is the guide's
own field list, a JSON string in the Message of an ordinary SNS notification,
with the owner account left out until the request carries one, which a request
filed at a named customer does from the start. A notice is taken wherever a
state is written rather than at each call site, so an expiry found on a read
announces itself the way a claim does, and a call that then fails on the
expired request still sends it. What notifies is a transition: a second
UpdateDelegationRequest on a request already under review writes its notes and
tells the partner nothing. NotificationChannel is held to more than its
declared shape, which is looser than an ARN: the member's own documentation
says only SNS topic ARNs are accepted, so a value naming no topic is refused
on the create with InvalidInput rather than accepted into a lifecycle nobody
would hear about.
IAM publishes as iam.amazonaws.com through ServiceCallAuthorizer, so the topic's
own policy decides and nothing the caller holds plays any part, which is the
statement the guide has partners add to their topic. The request's own ARN and
the account that filed it go as aws:SourceArn and aws:SourceAccount. Both the
policy and the topic are read in the account the topic ARN names: the topic is
the partner's and most of these transitions are the customer's calls, so account
aware storage would otherwise look in the caller's account and find no topic at
all.
Notifications go out once the delegation lock is released, from a snapshot taken
while the transition still owns the record, a stored request being a mutable
instance every caller holding it shares. A delivery that fails costs the
notification and not the transition behind it.
With floci.protocols.strict-claiming off, the default, a request that no wire protocol claims is
logged and served by whatever route it matches. The checks after routing read the claim, so they
saw a request of no protocol:
- IAM enforcement served it unsigned. The MissingAuthenticationToken refusal applies only to a
JSON, CBOR or Query claim. An unsigned SQS ListQueues over JSON or Query, or a Kinesis
ListStreams over CBOR, was served when it carried a Smithy-Protocol header Floci does not serve
that path by: an unknown value, or rpc-v2-cbor outside the rpcv2 path. An X-Amz-Target call with
no Content-Type reached the CBOR endpoint the same way.
- IAM enforcement checked a signed REST request as the action its X-Amz-Target header named, not
its route's. A user allowed only s3:GetObject deleted an object by sending the DELETE with
X-Amz-Target: AmazonS3.GetObject and any Smithy-Protocol header. A signed JSON call it refused
got the REST status, 403, rather than JSON's 400 AccessDeniedException.
- A call to a disabled service was served when only its claim would have named the service, as for
an unsigned JSON or rpcv2 call.
- A REST JSON service request that fell through to S3's wildcard routes was not rejected, and a
REST request signed for a service Floci lacks skipped the guard that refuses it before routing,
so S3's routes answered it with a misleading error.
The new AwsRouteClaimFilter runs after route matching and before every filter that reads the
claim, AccountContextFilter's unknown-Region refusal and the signature check among them. It claims
such a request by the route it reached, through ProtocolClaimer.routeClaim:
- the JSON 1.0, JSON 1.1 and CBOR endpoints by X-Amz-Target;
- the rpcv2 route by its path;
- the Query endpoint's POST by the form;
- every other route as REST.
Those routes serve the request the same way whatever Smithy-Protocol header it carries, so the
claim names the call that runs. A request claimed as REST also gets the unknown-service-scope
check a claimed one gets before routing, which AwsProtocolClaimFilter now exposes for it. A
claimed request is left as it was, and strict claiming still rejects an unclaimed one before
routing.
An X-Amz-Target post with a content type no protocol uses, the third kind of request the
strict-claiming docs list, matches no route at all, and got a 500 rather than its 415, as any root
POST in a content type no endpoint consumes did. Several resource methods share POST /, so RESTEasy
Reactive routes it to a placeholder with no method of its own that picks one by content type, and
answers 415 from there when none consumes it. The ResourceInfo producer then returns the
placeholder's missing method, and CDI refuses the null with IllegalProductException.
AwsRestJsonErrorHeaderFilter and S3CorsFilter read ResourceInfo on every response, so each failed
on it. Both now read it through the new RoutedResource, which gives null when routing chose no
method.
docs/services/iam.md and the strict-claiming setting's docs say how such a request is handled.
IamEnforcementFilter builds its rpcv2 route claim through the same ProtocolClaimer helper.
* fix(dynamodb): export the table as of ExportTime
* refactor(dynamodb): share the epoch seconds conversions
* fix(dynamodb): treat a table that is still being created as not found on export
* docs(dynamodb): note the writes made before point-in-time recovery is enabled
* fix(dynamodb): round timestamp inputs to milliseconds as AWS does
* fix(dynamodb): check the ListBackups time range limits
* fix(dynamodb): check the ListBackups ExclusiveStartBackupArn length
* refactor(dynamodb): reuse requireBackupSource for the export table lookup
ListQueues ignored MaxResults and NextToken on every protocol path and
returned all matching queues without a token.
The paging now lives in SqsService, so the Query, JSON and CBOR paths
share it. It follows the API reference and the botocore model:
MaxResults must be 1 to 1000, a NextToken is returned only when
MaxResults was set and more queues remain, and without MaxResults the
response holds at most 1,000 queues and no token. Queues are ordered by
name, the token is the shared Pagination cursor under its own
namespace, and QueueNamePrefix filtering applies before paging. An
out-of-range MaxResults or an unreadable NextToken returns
InvalidParameterValue.
Fixes#6219
ListRules ignored Limit and NextToken and always returned every
matching rule. It now pages through the bus's rules in name order using
the shared Pagination cursor, keeping NamePrefix and EventBusName
filtering intact.
- Limit defaults to 100, the documented per-page maximum; an integral
value outside 1 to 100, including one wider than an int, is a
ValidationException.
- A string, boolean or fractional Limit is a SerializationException
rather than being coerced into a page size.
- NextToken is returned only when more rules remain.
- A token Floci did not mint is rejected with HTTP 400 InvalidToken, as
the API reference documents for a bad pagination token.
Fixes#6220
* fix(cognito): fire the CustomMessage trigger for UpdateUserAttributes and GetUserAttributeVerificationCode
Both sent their verification codes without the CustomMessage trigger, so a
pool's function never shaped those messages and never saw the request's
ClientMetadata. They now fire it with CustomMessage_UpdateUserAttribute and
CustomMessage_VerifyUserAttribute.
Measured on Cognito, the event carries the user as stored once the request is
done: the whole update applied, and an email that must be verified before it
changes still the old one while the code goes to the new address. The message
is therefore sent once the update is stored and the user lock is released. The
trigger is synchronous, so holding the lock would also block a function that
calls the pool back for the same user until its invocation timed out, which
SignUp already avoids. Cognito keeps an update whose code it cannot deliver
and answers CodeDeliveryFailureException, and a message that cannot be sent
now does the same.
* fix(cognito): leave nothing behind when an attribute code's message is not sent
Sending an attribute code's message after the user lock opened four ways to
leave a code live that no message carried, or to fail an update already
stored. Each message is now sent on its own: one that cannot be sent has its
code withdrawn, so another can be asked for at once as on Cognito, and the
others still go out. An update that stops before it is stored withdraws the
codes it already issued. The pool, the client and a copy of the stored user
are read while the lock is held, as SignUp captures its trigger's user, so
nothing is looked up once the update is stored.
A Route 53 RecordSet resource now writes Region, Failover, Weight and
HealthCheckId into the record, as ChangeResourceRecordSets stores them.
A HealthCheck resource creates a health check with its tags, and its Ref
and HealthCheckId attribute return the check's id. An unknown Type is
refused before any check is created. Changing Type, RequestInterval or
MeasureLatency replaces the check, and the old one is deleted once the
update commits, or kept under UpdateReplacePolicy: Retain. Any other
change updates the check in place, and a failed stack update puts back
its earlier settings and tags.
With a path in FLOCI_BASE_URL, such as http://localhost:4566/sqs, both endpoint
strategies find the same queues. Queues saved under the longer path move to the
new key at startup. An entry saved without an account prefix moves to the
account its queue path names and is removed by its stored key. An entry whose
new key already holds a different value stays in place, with a warning.
* feat(lambdaweb): fail a revision whose code is not a zip
A revision whose code is not a zip is Failed, as on AWS, and cannot be
deployed. The endpoint CreateWebFunction makes on such a revision is
Failed too and answers 409 Platform.EndpointNotActive. An empty object
is a 500 InternalServerException with an empty body, as on AWS.
* fix(lambdaweb): remove a code copy that cannot be read and name the {} body
* test(lambdaweb): upload a real zip in the compatibility tests
* fix(ec2): AND repeated filter names on every Describe action
The Query handler read Filter.N into a map keyed by name, so a filter
whose name was already given replaced the earlier one: tag-key=Env with
tag-key=Team matched every resource tagged Team, and two vpc-id filters
naming different VPCs matched the second VPC's resources. AWS joins
every filter with an AND, a repeated name included.
Every Describe action that reads Filter.N now passes the filters in
request order to the service, as DescribeKeyPairs, DescribeTags and
DescribeAvailabilityZones already did, and each filter narrows the
answer the way a lone filter of that name does. The service keeps its
map overloads for the callers that build filters of distinct names in
code; they delegate to the ordered overloads, so what they get back
does not change. DescribeImages builds its lookup image from the first
name wildcard and returns it only when it satisfies every filter.
Four existing tests passed null or any() as the filters of a method
that now has a second overload. They pass Map.of() or anyMap() instead,
which is what the code under test sends.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): sweep transit gateway peering attachments for repeated filters
DescribeTransitGatewayPeeringAttachments goes through the same shared
matcher as the other actions the parameterized tag-key case covers, but
had no case of its own. It now has one: two tag-key filters find only
the peering attachment that carries both keys.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): satisfy every repeated filter when building a lookup image
With a filter name given twice, DescribeImages built the image it
synthesizes for an unmatched lookup from the first name wildcard and the
first concrete value of each other filter, so a later filter of the same
name could reject it and the lookup came back empty: architecture with
x86_64 or arm64 and architecture with arm64 returned nothing. Each name
filter now offers its wildcard in turn, and each other value is the
first one that every filter of its name admits. A lone filter of each
name still yields the one image it always did.
DescribeInstanceTypeOfferings kept the types of its InstanceType.N
parameter only through the first instance-type filter, so repeating that
filter dropped them. They are now kept beside the types that every
instance-type filter names.
The docs say "an action" rather than "a Describe action", since the Get
and Search actions that read Filter.N are covered too.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): let an instance-type filter without values narrow nothing
DescribeInstanceTypeOfferings looked up the types its first
instance-type filter named, so a first filter without values limited the
answer to the InstanceType.N types while a later one without values
narrowed nothing: the answer depended on the order of the filters. A
filter without values now names and narrows nothing wherever it stands,
as a lone one never added a type.
The lookup image of DescribeImages tries the first wildcard of each name
filter, which the comment now says. Every filter value the image is
built from is tested by the image matchers' own rule.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* refactor(ec2): name the per-filter checks of repeated filters
The test that every filter of one name admits a value was written out by
hand at each site. Two helpers beside everyFilterAdmits now carry it:
everyFilterContains, for exact values where a filter without values
admits anything (security group rules, prefix lists, the later
instance-type filters of DescribeInstanceTypeOfferings), and
everyFilterMatches, for values with wildcards where a filter without
values matches nothing (the location filters of offerings, and the
spot-price and timestamp filters of DescribeSpotPriceHistory). No
answer changes.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): match instance-type wildcards in DescribeInstanceTypeOfferings
AWS takes * and ? in an instance-type filter value of
DescribeInstanceTypeOfferings (the CLI reference filters on c5*), but
Floci looked each value up by its exact name, so a lone t3.* found
nothing and t3.* beside t3.micro found nothing either. A first filter
holding a wildcard now looks up the whole catalog, and every filter
matches a type with the same matcher as the location filter. Exact
values give the same answer as before.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): pin an empty lookup for overlapping name patterns
Two name filters foo-* and *-bar-* overlap, but the image built from
the first wildcard of each breaks the other filter. DescribeImages
returns no image here, as AWS returns only images that exist; before
the filters were ANDed it returned one that broke foo-*.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): match offerings instance-type values with the linear glob
The instance-type wildcards of DescribeInstanceTypeOfferings went
through the regex matcher, which backtracks on a caller-supplied
pattern of many stars: twenty stars took about sixteen seconds per
request. They now go through everyFilterAdmits, the two-pointer glob
the image filters already use. Value-less filters are dropped before
the check, so no answer changes. Also reword a test comment.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): name the matcher a many-star pattern goes through
The glob that matches instance-type values is a two-pointer match, not
a strictly linear one, so the test's Javadoc says that instead.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>