* fix(docker): rebuild local helpers for daemon platform and recipe
Preserve the complete retained helper platform and recipe feature from fork #301 on current main. Rebuild foreign-platform or stale-recipe helpers, explicitly pull the native base, and retain the isolated Docker regression and existing workload launch-platform API.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test(docker): isolate helper platform and reuse checks
Give foreign-platform fixtures the current recipe label and count real Docker build requests so cached image IDs cannot mask an unnecessary rebuild.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test: share cached helper image fixtures
Reuse one cached-image stub and recipe hashing helper across helper-image and ECS proxy fixtures. Gate native helper execution on the shared Docker availability probe instead of an opt-in property. Preserve platform and actual build-count assertions. Addresses upstream review 5729804211.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test: restore shared base image after helper platform checks
Preserve the original base image tag through successful, skipped and failed helper-platform fixtures. Keep the requested Docker availability gate and the existing native-build and cache-reuse assertions.
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(autoscaling): retain indexed instance mutation members
Use the existing indexed member parser for AttachInstances, DetachInstances and SetInstanceProtection. Keep all members for service validation before mutation, including after gaps. Preserve existing validation and protocol responses.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(autoscaling): count actual detached instances
Keep every collected instance ID available to validation, but decrement desired capacity only for members actually detached. Cover repeated query values and ignored unknown IDs without changing the false decrement flag.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test: consolidate Auto Scaling indexed instance fixtures
Cover all five instance-list actions with one sparse, large, repeated and ignored-key parameterized map. Preserve validation-before-mutation and repeated-detach capacity regressions. Addresses upstream review 5729806284.
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
In memory mode, or with prune-volumes-on-delete, deleting the last repository
removes the backing registry container and the next CreateRepository starts a
new one. Floci running in Docker reached the registry by container name, so
when the new container got a different IP the JVM's cached lookup kept
answering with the old address. Until it expired, DeleteRepository returned
500 and CreateRepository could wait long enough for the SDK to time out and
retry, which then failed with RepositoryAlreadyExistsException.
Use the address Docker reports for the container just started or adopted,
and only fall back to the name when none is known. EcrTest no longer needs to
keep a repository to avoid this.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(redshift-serverless): ensure generated admin password contains uppercase, lowercase, and digit
- Dam bao mat khau ngau nhien sinh ra luon chua it nhat mot chu hoa, mot chu thuong va mot chu so, dap ung quy tac mat khau cua Redshift
* test(redshift-serverless): verify password complexity retry with deterministic candidates
- Bo sung test xac dinh (deterministic) kiem tra generatePassword bo qua cac candidate thieu chu hoa, chu thuong, chu so va chi tra ve khi du ca 3 dieu kien
- Tach generatePassword(Supplier<String>) de inject candidate trong test va tien bien dich cac Pattern kiem tra regex
In the docker runner mode an s3-dist-cp step, the Release Guide's way of
moving data "from Amazon S3 into HDFS where it can be processed by
subsequent steps", between buckets or back to S3, was FAILED without
running, and on the default TERMINATE_CLUSTER it ended its cluster with
errors. The EMR Serverless image steps run in has neither s3-dist-cp nor
the MapReduce it runs on.
Now a command-runner.jar step whose first argument is s3-dist-cp runs
Floci's own S3DistCp: a Python program, emr/s3-dist-cp.py, which the step's
command writes into the container and runs through spark-submit, copying
through Hadoop's file systems in Spark's JVM. The command wrapper gives it
what a Spark step gets: S3 paths in Floci's S3 and hdfs:// paths, and
those without a scheme, in the cluster's HDFS. It takes the options of
the Release Guide's table, --name=value or --name value, and -D
property=value:
- --src and --dest, a source folder's files keeping their folders;
- --srcPattern and --groupBy matched against the whole path; --groupBy
concatenates the files whose groups give the same name into one file
named by them, and refuses an expression with no group, as the guide
says S3DistCp does; --targetSize breaks a larger group into parts
numbered before the extension ("myfile0.gz, myfile1.gz"); without
--outputCodec a group keeps the compression its files share, named
with that codec's extension, or has none when they differ, each file
decompressed so the group is one stream;
- --outputCodec (gzip, gz, lzo, lzop, snappy, none) through Hadoop's
codecs, each source decompressed by its own extension;
- --deleteOnSuccess, deleting the files but not their folders, as AWS's
"Seven tips for using S3DistCp" says;
- --outputManifest, --previousManifest, --requirePreviousManifest and
--copyFromManifest, the manifest gzipped JSON lines of path, baseName,
srcDir and size, as that post shows them;
- --s3ServerSideEncryption, --storageClass, --disableMultipartUpload and
--multipartUploadChunkSize as S3A's settings; --numberFiles,
--startingIndex, --srcPrefixesFile and --appendToLastFile, the last
through a copy renamed over the file, as neither S3 nor the cluster's
HDFS appends in place. The copy has a name of its own and goes if the
writing fails, and the file steps aside, under a name of its own too,
until the copy has taken its place, coming back if it cannot, so a
failed append leaves it as it was. --s3Endpoint is ignored, S3 being
Floci's.
--requirePreviousManifest takes true or false, after = or as the next
argument, and alone is true, its default. A --srcPrefixesFile line ending
in / names that folder alone, its slash kept though Hadoop's Path drops
it; any other is a prefix as S3 lists one, logs/day taking in
logs/day-old/.
A bucket name with an underscore fails the step, as S3DistCp "does not
support" one, and so does a copy Hadoop fails, leaving what was copied.
A copy that would write two files to the same path, the manifest
included (a.log and a.log.gz with --outputCodec=gzip), a file over one
of its own sources, as with the same --src and --dest, or a file outside
--dest, through a .. in a manifest's baseName or in --outputManifest
(Hadoop's paths resolve it), or a file with no name, from a --groupBy
whose groups matched nothing say, fails before it writes anything. emr.md
says what is Floci's own reading: the grouped file's folder,
--numberFiles' naming, a group's compression without --outputCodec and
that refusal.
Under IAM enforcement, Application Auto Scaling requests were checked on
`*`, so a grant scoped to a scalable target was refused and a deny
scoped to one never applied.
A scalable target's ARN ends in a unique id the service assigns,
`scalable-target/<id>` ("The unique ID ... is a value assigned by
Application Auto Scaling to the scalable target"), which the Service
Reference names ${ResourceId}, while requests name the target by
ServiceNamespace, ResourceId and ScalableDimension. Read as the table
reads other services, ResourceId (`service/<cluster>/<service>`) would
have filled that id, so the namespace was left out until the table could
look the ARN up.
The generator's new FOUND_BY gives a type whose ARN is all an id its
service mints, with the members a request names it by. An operation
whose request has them all names the type by them (`find`), generated
rather than corrected, and the reader asks the service for the ARN they
find through StoredResourceArns, the lookup EventBridge's connections
already use, or else checks the ARN with its id open, as for a create.
StoredResourceArns.find now takes the values a request names the
resource by, in the table's order: one name for EventBridge, the three
members for Application Auto Scaling, whose service now implements it
from the store its handlers read. A member left out or given a JSON
null names none, as the handler reads it.
Application Auto Scaling joins the table (14 operations, 1036 over 25
namespaces): RegisterScalableTarget, DeregisterScalableTarget,
PutScalingPolicy, DeleteScalingPolicy, PutScheduledAction and
DeleteScheduledAction are checked on the target's stored ARN, and a
RegisterScalableTarget registering a new one, its tags included, on
`scalable-target/*`; TagResource, UntagResource and
ListTagsForResource on the ARN their ResourceARN gives; the Describe
operations and GetPredictiveScalingForecast on `*`, as AWS checks them.
`arnType`'s pattern ends in a five-digit escape, the U+10000 to U+10FFFF
range, where Java reads a backslash-u escape as exactly four digits and takes
the rest as literals. Compiled as the model writes it, that range became the
character U+1000, a literal zero, a hyphen, U+10FF and two literal Fs, so the
character class gained a range from `0` to U+10FF: it refused every
supplementary character the model admits and admitted the C1 controls it
excludes, U+0081 among them. Every member the shape resolves to was answered
the wrong way round: `RoleArn` on the three assume-role operations,
`PrincipalArn` on the SAML one, each entry of `PolicyArns` on those three and
on `GetFederationToken`, `TaskPolicyArn` on `AssumeRoot` and the
provided-context ARN on `AssumeRole`.
Each wide escape is read as the code point it spells now, which is what the
model means by it, written in Java's own form by one object that both
constraint checks compile their patterns through. `arnType` is the only shape
in any of the 28 vendored files carrying such an escape, so nothing else
moves, and a run of five or six digits naming no code point is left as the
model wrote it.
`MinimumSessionTokenSize` is published on six operations and was materialized
on one. `AssumeRoot` minted a token of the size asked for while the other five
minted 200 characters whatever the request sent, so the member was validated
and then ignored. All six mint their token through one writer now, which keeps
the floor at the 200 this emulator mints when a request asks for less, since
that is what a minimum asks for. `GetDelegatedAccessToken` models no such
member and keeps the 200 on its own.
`violation(String)` goes with them: wave 4 took out the three hand-written
checks that called it, and nothing has called it since.
`docs/services/sts.md` carries both readings.
* fix(dynamodb): check every number in an item request first and read its exponent as a long
* fix(dynamodb): read only the members an item operation has, each at the stage DynamoDB reads it
* chore(dynamodb): pass each request member to the number check and walk the values with plain loops
Preserve every positive indexed standby member for validation before mutation. Reuse the existing capacity-target parser and sort numeric indexes without integer conversion. Preserve accepted namespace assertions and current main behavior. Sparse AWS index acceptance is not claimed.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(elbv2): relay TCP listeners without HTTP parsing
Forward raw TCP traffic and TLS passthrough to registered targets while preserving per-connection routing. Cover the data plane through AWS SDK integration tests and document dedicated-port limitations.
Refs #5870
* test(elbv2): make TCP data plane test cleanup resilient to partial failures
* refactor(elbv2): share target selection helpers between TCP and HTTP paths
Extract targetCandidates and pickRoundRobin to remove the duplicated
healthy-or-registered fallback and round-robin pick from the TCP relay
and HTTP forwarding paths, unifying both on the floorMod counter that
cannot go negative.
* fix(elbv2): honor listener tcp idle timeout and park colliding listeners
Use tcp.idle_timeout.seconds attribute dynamically in the TCP relay tunnel, and register colliding listeners on in-use ports as parked with a warning, promoting them once the active listener is removed.
* fix(elbv2): validate tcp idle timeout range and reuse timeout parser
* fix(elbv2): unify parse failure and range check in listener attribute validation
IAM enforcement matched a REST request's action rules and built its
resource from the request URI as UriInfo gives it, where an encoded dot
segment such as %2E%2E is still encoded and consecutive slashes are
already collapsed. The router matches on the request's normalized path,
which decodes the dots and removes the dot segments, or, after a filter
rewrites the request URI, on the new path. A path written with %2E%2E
therefore reached one operation and resource while IAM checked another:
- GET /2015-03-31/functions/x/%2E%2E/fn reached GetFunction on fn, but
matched no Lambda rule and passed as an unknown action, so a deny on
lambda:GetFunction did not apply.
- GET /restapis/<id>//%2E%2E/stages reached the stages of <id>, but was
checked against ::/restapis/stages.
IamActionRegistry.rawPath and routedPath now read the path the router
matched from the RESTEasy Reactive request context, and the
ResourceArnBuilder branches that read the decoded path take it decoded
from the same place. A synthetic context without that request context
keeps the UriInfo reading. S3 keeps matching the path as sent, where
/bucket//key names the key /key.
Closes#7189
* fix(lambda-web): write the day with two digits in the date header of the platform pages
The platform pages and the 414 write the day of their date header with
two digits on AWS, as in Sun, 01 Nov 2026. RFC_1123_DATE_TIME writes 1.
* refactor(lambda-web): write the Date header of the metadata server with platformDate
* fix(autoscaling): use the modeled XML namespace
Promote the complete retained fork #269 namespace correction and exact Query success/error/catalog assertions. Original feature by Jackson Price <jxnprice@amazon.com>, authored 2026-10-28; original source commit d094b6168031df46c708d4dce056580d7e631853 retained unchanged.
Co-authored-by: Jackson Price <jxnprice@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* test(autoscaling): share modeled namespace assertions
Share the package namespace assertion across the Query handler and integration tests. Preserve root and all-descendant checks, the returned Element, and all existing populated, empty and error response assertions.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(kinesisanalytics): paginate ListApplicationSnapshots
* test(kinesisanalytics): cover ListApplicationSnapshots pagination and bounds
* test(kinesisanalytics): pin the snapshot cursor contract in tests
Assert the delete in the resume-after-deletion test, and the surviving list
length, so a no-op delete cannot let the case pass vacuously. Accept a token
purely as a cursor up to the modeled 512 characters, since this NextToken
declares no pattern. Reuse the issued token instead of retyping the expected
cursor, and assert the page-size message on the wire.
* fix(cloudfront): tunnel WebSocket upgrades to custom origins as AWS does
CloudFront forwards WebSocket handshakes to the origin on every distribution, but
Floci's serving path is a JAX-RS resource that strips Upgrade and Connection and
fetches the origin with a blocking client, so a socket.io client behind a
distribution never left long-polling.
A Vert.x route ahead of JAX-RS now catches an HTTP/1.1 WebSocket handshake to a
distribution host, resolves the behavior and custom origin as the GET path does
(allowed methods, signed requests, origin request policy, origin custom headers,
private-address guard), sends the handshake with its upgrade fields and splices
the two connections once the origin answers 101. Any other answer is relayed as
an ordinary response, and handshakes the distribution would not tunnel fall
through to the existing GET handling. Handshake detection and the byte relay are
shared with the ALB data plane.
* fix(cloudfront): honor disabled service and origin timeouts on WebSocket refusals
The WebSocket route runs ahead of ServiceEnabledFilter, so it now checks that
CloudFront is enabled before taking a handshake and otherwise falls through to
the disabled-service answer.
An origin answer that refuses the upgrade is no longer piped without limits: its
body is streamed within the origin's response timeout between packets and its
response completion timeout in all, counting only the origin's time, and an
origin that stalls past them ends the viewer connection.
* test: share the ALB fixture between the WebSocket integration tests
CloudFrontWebSocketIntegrationTest repeated ElbV2WebSocketIntegrationTest's load
balancer, target group, listener and WebSocket exchange helpers. Both now use
AlbFixtures.
* refactor(cloudfront): have the WebSocket origin clock spend a shared CompletionBudget
* fix(dynamodb): refuse unconvertible and out-of-range PartiQL number parameters before parsing the statement
* fix(dynamodb): decode binary PartiQL parameters first, and count types while reading each parameter
* fix(dynamodb): take a PartiQL parameter member set to null as absent
* fix(dynamodb): drop null parameter members before IAM reads the PartiQL attributes
CreateBackupPlan and UpdateBackupPlan accept Rules[].TargetLogicallyAirGappedBackupVaultArn
(BackupRuleInput) and GetBackupPlan returns it on BackupRule, but the rule model had no such
field, so Jackson's ignoreUnknown dropped it on read. Add it, omitted from the response when
the request did not set it.
* fix(docker): start the Windows binary with or without Docker running
The 2.4.0 Windows standalone binary exited at startup with an
UnsatisfiedLinkError for Java_com_sun_jna_Native_open. docker-java's
named-pipe socket calls JNA when the pipe does not open at once, and
JNA was initialized at image build time, so its native dispatch library
was loaded into the builder and never into the binary. JNA is now
initialized at run time, its JNI metadata (from
oracle/graalvm-reachability-metadata, CC0) and a proxy registration for
NamedPipeSocket$Kernel32 are bundled, and FlociDockerHttpClient turns a
LinkageError from the transport into an exception, so a JNA that still
cannot load fails that one Docker call instead of the whole emulator.
With JNA working, a Windows host without Docker never answered its
health check: docker-java retries a missing pipe for the whole 30 s
connect timeout, and DockerRetry retried the NoSuchFileException six
times. The pipe is now opened once first and a missing or denied pipe
fails at once, keeping docker-java's wait loop for a busy pipe, and
DockerRetry no longer retries either error.
The release smoke script prints both ends of a long log on failure.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* test(docker): skip the named-pipe client tests on Windows and name the tolerated exception
Both tests stand a temporary directory in for a pipe, which only behaves that way off Windows: there a directory opens as access-denied and Kernel32 loads. The busy-pipe catch now names its exception expected, as AGENTS.md asks for a tolerated one.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
LaunchTemplateInstanceNetworkInterfaceSpecification.Groups is a GroupIdStringList
whose members are named groupId, not item. aws-sdk-go-v2 reads only groupId, so
Terraform saw security_groups as empty and planned an update every time.
In the docker runner mode each step of a cluster ran in a container of its
own, so nothing a step left in /home/hadoop, or in HDFS, was there for the
next, and the image has no HDFS at all: an hdfs:// path failed, and a path
without a scheme, which EMR reads as HDFS, went to the container's own
disk. The Management Guide calls HDFS "best used for caching the results produced by
intermediate job-flow steps", the prefix "hdfs:// (or no prefix)", and
"ephemeral storage that is reclaimed when you terminate a cluster"; the
Release Guide's S3DistCp page copies data "into HDFS where it can be
processed by subsequent steps".
Now a cluster's storage outlives its steps:
- each step's container mounts the cluster's two Docker volumes, one at
/home/hadoop and one at /mnt, both of which the image gives its hadoop
user, so Docker gives an empty volume that owner, and what the cluster's
bootstrap left there in the image its steps run in;
- HDFS is /mnt/hdfs: Spark gets fs.defaultFS hdfs:/// and the hdfs scheme
through Hadoop's ViewFileSystemOverloadScheme with a fallback link to
that folder, so hdfs:// paths and those without a scheme lead there, a
relative one under /user/hadoop, and a streaming query keeps its
checkpoints through Spark's file system checkpoint manager, as
FileContext refuses an hdfs:// path without a host. The cluster's
spark-defaults can set any of these otherwise;
- a command step's hadoop fs gets the same, through a copy of the image's
Hadoop configuration, or of the folder a spark-env export of
HADOOP_CONF_DIR names, links followed, whose core-site.xml takes in
the original's through Hadoop's XInclude and then those properties,
with its HDFS, MapReduce and YARN homes set; hdfs dfs runs as hadoop
fs, the image's hdfs command being unable to run;
- the volumes go once the cluster has ended and its last step is done,
tried again while Docker refuses, as the bootstrap's image is; on a
reset, a step's thread it overtook removing them again once its
container is gone; and, for clusters that are gone or have ended, when
the service starts, unless reconcile-containers-on-startup is off.
SparkJobRunner.Job carries the storage, which an EMR Serverless run leaves
null. ClusterStorage names, makes and removes the volumes;
EmrClusterStorage is its Docker side. A path without a scheme that a step
meant for its container's own disk now leads to HDFS, as on EMR. emr.md
says what HDFS lacks: no NameNode, no hdfs:// path with a host, no
hadoop fs -ls / and no S3 through hadoop fs.
* fix(s3): refuse a malformed or empty versionId with 400 InvalidArgument
S3 refuses a version id it did not mint with 400 InvalidArgument,
also on a missing key, and an empty versionId with its own message.
Floci mints every version id as a UUID, so it refuses any other value
on the object operations that take a version id.
* docs(s3): say an unknown UUID version id is handled as a missing version
* feat(stepfunctions): dispatch ECS Lambda mapping and secret SDK tasks
* fix(stepfunctions): render ECS task-set StabilityStatusAt as ISO-8601
* refactor(stepfunctions): share recase and timestamp helpers with SDK management invoker
Reuse AslExecutor.recaseKeys (with a verbatim-key set), capitalizeFirst and a
single renderSdkTimestamps walker instead of copies in SdkManagementTaskInvoker,
and inject the invoker through the AslExecutor constructor.
* fix(s3): name the key and version in NoSuchVersion errors
Every NoSuchVersion error names the key and the version id, and an
annotation request for a missing version answers NoSuchVersion
instead of NoSuchKey, as on S3.
* test(s3): check annotation put and delete and a missing key for NoSuchVersion
* refactor: read ARN resources through AwsArnUtils in EventBridge, Pipes and three more
Archive, replay and Pipes event-bus targets, Pipes Kinesis sources, MicroVM image and network
connector tags, Cloud Map tags and ECS service registries cut an ARN at its last '/' or ':'
by hand. They now read the resource with AwsArnUtils.resourceIfArnFor, which also checks the
service. A Pipes Kinesis source given as a stream-consumer ARN names its stream instead of
"consumer:timestamp", and an ECS registryArn that is not a Cloud Map service ARN is ignored
with the existing warning.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(lambda): read a MicroVM tag target the same way for IAM and the tag paths
TagResource takes only an ARN, and a network connector without a version. LambdaMicrovmsService.taggedResource is now the one reader for both the tag paths and ResourceArnBuilder, so a version-qualified connector is refused instead of reaching the bare connector while IAM checks another resource.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Promote the complete retained fork #235 listener lookup validation and affected SDK and CloudFormation regressions on the qualified main base. Preserve the original compatibility fixture and JUnit SDK adapter.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>