* fix(ecs): preserve requested service platform version
* fix(ecs): restore requested platform version on rollback
Snapshot the requested service setting separately from the resolved revision version so rollback preserves LATEST. Retain a fallback for older snapshots and cover numeric versions, serialization and rollback after restart.
The tests #8019 added left S3 state in the emulator every @QuarkusTest
class shares. S3UnservedBucketSubresourceIntegrationTest made four
buckets and deleted none, and the slash-only key test left its bucket
with the "//" object in it, so a later ListBuckets or resource scan
saw them.
Each test now deletes what it made in an @AfterEach and checks the
204s, so a cleanup that stops working fails the test, and a test that
fails part way through still cleans up. The two bucket names the
sub-resource tests expect no request to make are deleted too, in case
a failing run made one.
A docker cluster's YARN and HDFS ran on its primary node alone, however
many instances the cluster named. On EMR "Core nodes run the Data Node
daemon", "a core node runs YARN NodeManager daemons, Hadoop MapReduce
tasks, and Spark executors", and "Task nodes don't run the Data Node
daemon".
- Each core and task node is a container of its own on the cluster's
network, with its data in a volume of its own, its name there the
private DNS name ListInstances gives it. The primary node keeps a
DataNode and a NodeManager only on a cluster created with no core
node, which keeps them as core nodes are added, and a primary node
whose volume holds a DataNode's data runs it in any case, so the
blocks on it stay in reach.
- ListInstances gives each group's instances addresses of their own, so
an instance keeps its address while another group resizes.
- How many follows the instance groups' counts or the instance fleets'
target capacities, at most yarn-max-worker-nodes, core nodes first. A
fleet's unit of capacity is one node. With 0 a cluster runs on its
primary node alone.
- HDFS keeps what EMR's does: one copy of a block below four core nodes,
two below ten, three otherwise, or the hdfs-site classification's
dfs.replication. Steps' Spark, Hive and hadoop clients write that many.
- A resize reaches the nodes of a cluster a step has started them on, on
another thread: a new node takes work once it has registered, and one
no longer wanted is decommissioned, HDFS and YARN telling when it may
go, within EMR's default hour, each node its own, then goes with its
data. Core nodes stop at the copies HDFS keeps.
- A core node's NodeManager is decommissioned only once HDFS has moved
its blocks, as a decommissioned NodeManager exits, which ends the
node's container, its DataNode with it. A core node that has gone
stays among HDFS's excluded nodes until the NameNode has it dead, 40s
after it stopped, so the copies it held never count again.
- A core node that stops before HDFS has moved its blocks starts again
on its data, and one a shutdown cut off while it was decommissioned
starts again with the cluster's next step, from its volume, which
carries its name, to be decommissioned then. A task node's volume a
shutdown left goes.
- A decommissioning round that fails, a refresh of HDFS's or YARN's
lists among them, is tried again on the next; a node Docker will not
remove yet stays to be removed then, and one whose start a teardown
passed goes. A cluster's end removes the volumes of nodes that have no
container, and finishes even when Docker cannot list its nodes.
- The node list is read inside the cluster's lock, so a step queued
before a resize starts the nodes asked for by then.
- Container logs come from every node, a decommissioned one's first.
hiveAndSparkStepsShareTheClustersMetastoreServiceAndHdfs ran six steps
one after another: 88s on a loaded machine, and past the suite's
2-minute limit on a busier one.
Its two cats are now one step, which runs beside the Spark step, and the
report step also reads the Spark step's table, which a Hive step of its
own read before. Every assertion stays, and the case took 73s on the
same machine.
* test(rds): reuse MySQL login harness in older socket tests
* fix(rds): rewrite compressed IAM DDL in multi-statement queries
* fix(rds): preserve compressed MySQL frames at relay boundaries
* fix(lambda): retain MicroVM run settings and image version
Retain execution settings in run responses and stored MicroVM metadata, and select the requested image version. Validate request bodies with vendored model constraints through the shared request validator.
* fix(lambda): share connector defaults and verify list summaries
Use the same managed connector projection for image and MicroVM responses. Cover the requested version and unchanged summary fields in ListMicrovms, including explicit-version and omitted-version controls.
Systemd guests ran with --cgroupns=host and the host's /sys/fs/cgroup bound
in, so every guest's systemd managed the same cgroup tree as the Docker
host and as each other. Two guests running Kubernetes nodes (kubelet with
the systemd cgroup driver, as Kubernetes The Hard Way configures it)
shared one kubepods.slice: both nodes saw the same inode, and each kubelet
tore down the other's pod sandboxes, so every pod restarted in a loop
(SandboxChanged, "network namespace for sandbox ... is closed").
A private namespace without the bind, as kind runs its nodes, gives each
guest's systemd its own writable subtree, because Docker mounts it
read-write for a privileged container. Measured on OrbStack (cgroup v2):
two guests boot to 'running', each with cgroup 0::/init.scope on a
distinct cgroupfs root.
A guest under security-group enforcement runs unprivileged, and Docker
mounts an unprivileged container's private cgroupfs read-only, where
systemd cannot create its slices. That guest keeps the host namespace and
the read-write bind, so it boots as before; the docs say its cgroups stay
shared.
fix(ec2): keep the IMDS proxy out of a systemd guest's root cgroup
A privileged systemd guest now has a private cgroup namespace, and a
docker exec lands in that namespace's root. Floci leaves its link-local
IMDS proxy (socat) running from such an exec, so the guest's root cgroup
held a process. cgroup v2 will not enable controllers in a cgroup's
subtree_control while it holds processes, so the root's stayed empty and
kubelet with the cgroupfs driver died creating kubepods.slice
("openat2 /sys/fs/cgroup/kubepods.slice/pids.max: no such file or
directory"). Whether a node hit it depended on whether anything else
enabled the controllers before the proxy started.
The proxy's install and start scripts now move their own shell into the
leaf /sys/fs/cgroup/floci first, so socat and everything else they start
stay out of the root. They do so only at the root of a cgroup v2
namespace whose cgroupfs is writable; a host-namespace container, a
cgroup v1 host and a read-only mount run as before. A plain directory
rather than systemd-run, because the proxy starts while the guest's
systemd may still be booting, and systemd neither reaps nor moves a
cgroup it did not create. EKS's pod-identity proxy shares the script.
The Docker integration test launches a privileged systemd guest through the real
container spec. It now also reads /proc/self/cgroup, which must be 0::/ at the
namespace root, and creates and removes a directory under /sys/fs/cgroup, so
native Linux CI fails if the guest falls back to the host cgroup namespace.
Rewrap the class javadoc, rename the test to cover both the modules and the
cgroup namespace, and comment what each cgroup probe does and does not prove.
* fix(eventbridge): validate scheduled rule rate expressions
Validate schedule expressions before PutRule creates or mutates a rule. Reject mismatched rate units with the AWS ValidationException while preserving existing rule state and timers. Keep stored-expression parsing tolerant.
Add service, SDK and scheduler regression coverage.
Closes#7996.
* refactor(eventbridge): share rate parsing and cover legacy stack updates
Use one matcher and parsed value/unit helper for strict API validation and tolerant stored-expression execution. Keep unit agreement checks at the API boundary.
Add a CloudFormation SDK regression proving that unrelated stack updates already skip unchanged legacy rules while direct PutRule calls remain strict. Correct the outdated test comment suggesting every resource is re-provisioned.
* refactor(eventbridge): share AWS rate validation with Scheduler
Move positive value, supported unit and singular/plural constraints into core.common.AwsRateExpressions. Both API validators call the shared checks while their execution parsers retain support for legacy stored expressions.
Parse Scheduler rates once per call and retain its checked interval conversion. Add cross-service tests for matching acceptance and rejection reasons.
Addresses review 5876298647 on #8113.
Keep the current tags when replacing an imported certificate under its
existing ARN. Certificate.setTags already copies the map and normalizes
null, so use that boundary for initial imports and reimports alike.
Cover tag retention and replacement material through the AWS SDK in
commercial and GovCloud regions, including later tag additions/removals
and an untagged certificate.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
CreateBlueGreenDeployment stages a green copy of a PostgreSQL, MySQL or
MariaDB instance with the target engine version, parameter group, class
and storage, linked to the blue instance as a read replica and loaded
from a dump of it. SwitchoverBlueGreenDeployment gives green the blue
identifier, ARN, endpoint and tags and renames blue to <name>-old<n>;
the container manager moves each running container to its new ARN so
stop and delete still find it. DescribeBlueGreenDeployments supports the
four documented filters and paging, and reports INVALID_CONFIGURATION
when a member is gone. DeleteBlueGreenDeployment honours DeleteTarget
before switchover. Deployments are taggable by their deployment ARN.
Closes#8069
TagResource, UntagResource and ListTagsForResource answered
TargetNotFoundException for the organization's resource policy, because
resolveTagOwner matched account, root, OU and policy IDs only. The
model's TaggableResourceId pattern accepts rp- IDs, and AWS's own
CloudFormation handler for AWS::Organizations::ResourcePolicy tags the
policy and lists its tags through that ID.
resolveTagOwner now matches the organization's resource policy ID and
saves the organization, as the root branch does. Any other rp- ID still
answers TargetNotFoundException. The code comments that said a resource
policy is not a TagResource target are corrected, and the docs table
lists the resource policy among the tag targets.
UpdateSecretVersionStage removed the label from the old version and only then found that the target version does not exist, so the refused request left the secret without that label. Look the target version up before any label is moved.
Validate the attached stage and removal version before checking the
destination, keeping both checks ahead of any label mutation.
Cover omitted and mismatched removal IDs with missing destinations
through the AWS SDK for current and custom stages.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
PutReportDefinition now stores its Tags on the report definition, and
TagResource, UntagResource and ListTagsForResource read and change them
by ReportName instead of answering empty stubs. ModifyReportDefinition
keeps the tags, a missing report answers ResourceNotFoundException, and
the TagList and TagKeyList constraints from the model are checked.
Closes#7952
PutReportDefinition and TagResource now fail with ValidationException when the report would hold more than 50 tags, when Tags is not a list, or when a tag key, value or TagKeys entry is not a string.
tools/aws/regen_cur_shapes.py vendors the TagResource, UntagResource and ListTagsForResource input constraints from botocore, and CurRequestShapes checks them, and the Tags of PutReportDefinition, through RequestConstraintCheck in place of the hand-written limits.
MemoryDbService threw ClusterNotFoundFault, UserNotFoundFault and
ACLNotFoundFault with HTTP 404. The MemoryDB API Reference lists 400
for each, and botocore has no status for them. AWS's Smithy model
gives them httpError(404), but botocore calls MemoryDB over awsJson1_1,
which ignores HTTP binding traits.
Use 400 at all eleven places that throw them: the Describe, Update and
Delete actions, CreateACL with an unknown user, CreateCluster with an
unknown ACL, and the three tag operations.
Closesfloci-io/floci#8007
Persist whether a standalone instance has never initialized its database. Protect engine versions before backend startup so runtime loss and proxy failures cannot expose existing storage to a metadata-only version change. Update SDK compatibility assertions to reject unsupported upgrades and verify resizing separately.
Apply supported minor upgrades using the version-specific image on the existing volume and endpoint. Keep major upgrades, downgrades, and pinned-image changes blocked before mutation. Preserve the never-started case, report failed restarts honestly, and restore successful minor-upgrade coverage in the Java SDK compatibility suite.
* fix(glue): preserve existing partitions on duplicate creation
Reject CreatePartition for values already stored in the table before
mutating partition metadata. Keep the existing BatchCreatePartition
error and allow explicit updates through UpdatePartition.
Port the independent duplicate check and regression from
AndreKurait/floci commit f6905c8ced6c21fd9aeca013beb4ac511e5c1469.
Add SDK coverage for single and batch creation, preserved metadata,
per-item batch errors, and subsequent explicit updates.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(glue): serialize concurrent partition creation
Synchronize single and batch creates so duplicate detection and writes share
one service critical section. Cover all four concurrent single/batch combinations,
preserving the first metadata and per-item batch errors.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(glue): isolate catalog fixtures from Athena readers
Share the existing floci-duck resource lock with Athena and Firehose tests.
Their catalog setup must not read temporary Glue metadata whose S3 locations
are placeholders while the catalog test is running.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Closes#7979
Resolve symlinks on the working directory's path, relative or absolute,
and check every directory on the resolved path. Stop the check at a
function's EFS mount path, which Lambda enters as the access point's user.
Build the Dockerfile-only build context in one place,
DockerBuildContext.ofDockerfile, for the helper image and the two Docker
tests that built it by hand.
It created an application named test-app, which AppConfigIntegrationTest looks up by name when both run in one shard.
* feat(dynamodb): serve DescribeLimits and DescribeEndpoints
DynamoDB reports the default quotas of 80,000 read and write capacity
units per account and 40,000 per table. It names its Regional endpoint
with a cache period of 1,440 minutes.
* fix(dynamodb): name Floci's own address in DescribeEndpoints
With endpoint discovery on, the AWS SDK for Java 2.x sends later
requests to the address DescribeEndpoints names, even when the client
sets an endpoint. The Regional AWS host sent them to real DynamoDB.
Stream records through CopyBulkLoader.Cursor in loadRecords and reuse writeRecord, eliminating duplicate decompression, line skipping, record reading, heap tracking and blank line filtering.
Verify Cursor record iteration, line tracking and raw byte capture, along with writeRecord chunking across PostgreSQL CopyData wire frames.
GetSnapshot and ListSnapshots with an ownerAccount other than the caller's now read the
owner's snapshots and return only the ones the snapshot resource policy shares with the
caller. A snapshot is never shared across partitions.
* fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs
Keep runtime ARNs stable across versions and use the parent runtime ID and endpoint name for endpoint ARNs. Update API responses, ARN lookups, tagging dispatch and CloudFormation references together.
* fix(bedrock-agentcore): preserve legacy and harness runtime lookups
RedshiftQueryHandler wrote the same Tags/Tag loop in eight resource
builders: clusters, snapshots, cluster parameter groups, cluster
subnet groups, snapshot schedules, event subscriptions, snapshot copy
grants and integrations. They now call one tagsXml helper.
The XML is unchanged. Clusters, snapshot copy grants and integrations
still leave out an empty Tags list, and the other five still write
one. A new RedshiftQueryHandlerTest case pins both shapes for all
eight; it passes before and after the change.
Validate the compact UTF-8 JSON environment before function creation or configuration mutation. Both paths previously accepted the 5,000-character value reported in #7995. Cover exact byte boundaries, aggregate variables, Unicode, JSON escaping, and rejected-update atomicity through the AWS SDK.
Stop quota serialization through a bounded UTF-8 counting sink without allocating complete JSON and byte-array copies. Keep unchanged legacy environments out of CloudFormation configuration updates while validating changed variables and preserving environment removal. Add early-stop, one-megabyte input, Unicode buffer-boundary, and legacy-stack rollback regressions.
Include AWS's String measured diagnostic while retaining at most 5,120 UTF-8 bytes and terminating larger input early. Drop incomplete trailing UTF-8 characters before adding an ellipsis. Keep the 1 MB robustness request on CreateFunction, and assert every SDK configuration-update body stays below the separate 5,120-byte request limit. Cover complete measured JSON and bounded Unicode previews.
CreateUser and CreateACL never read their Tags member, and ListTags,
TagResource and UntagResource resolved every ARN as a cluster, so a
user or ACL ARN answered ClusterNotFoundFault and neither resource
could be tagged at all.
User and Acl now keep a tag map, set from Tags on create as
CreateCluster already does. The three tag operations pick the
resource from the ARN: user/ and acl/ look the name up in the current
Region and require the stored ARN to match, answering
UserNotFoundFault or ACLNotFoundFault, and any other ARN goes through
clusterByArn as before. The built-in default user and open-access ACL
are not stored, so they still answer the not-found fault. Users and
ACLs saved before this change have no tags field and load with an
empty map.
Fixes#7956
* perf(s3): read the query parameter map through the request helper
Each direct UriInfo.getQueryParameters() call made a new copy of the map.
The helper reads it once per request and gives a request without a query
string a shared empty map.
* perf(s3): read the query parameter map once where a method used it twice or more
Validate the description before replacing stored upstreams so a refused
UpdateRepository request leaves the repository unchanged. Cover rejected
replacement and clearing requests through the AWS SDK, including successful
updates at the accepted description-length boundary.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Take the execution monitor when an action, stage or condition records a
failure. A concurrent stop can no longer replace a Failed write between
its terminal check and its Stopping transition.
Port the remaining failure transitions and regression coverage from
AndreKurait/floci#710. The stop handler already landed in upstream #7939.
Hold the execution monitor across the approval completion check, result
updates and persistence so stop cannot interleave with a rejected result.
Share the held-monitor stop helper and cover rejection before a waiting
stop. Wait for approval polling after token persistence in the existing
stop-completion fixture.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Accept SDK credentials in AwsTestClients so session identities use the same
endpoint and transport setup as basic credentials. Reuse the overload in
federation, token-duration and principal-tag fixtures.
Follow up on the shared client setup requested in PR #7839.
Use AwsTestClients for the remaining STS duration, S3 resource-account and
EC2 signature fixtures. Expose its credentials-and-transport overload so
EC2 keeps Apache, and pass S3's path-style builder through the common path.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
CreateClusterParameterGroup and CreateClusterSnapshot both take Tags,
but the handler never parsed them, so the new parameter group or
snapshot came back untagged: in the create response, in
DescribeClusterParameterGroups and DescribeClusterSnapshots, and in
DescribeTags on its ARN.
Tags are now parsed (Tags.Tag.N and Tags.member.N) and stored on the
resource, as CreateClusterSubnetGroup already does, and the
ClusterParameterGroup and Snapshot elements carry a Tags list, as AWS
returns them. DeleteCluster's final snapshot and automated snapshots
are still created without tags.