createAuthChallenge now returns an empty map when the trigger is absent,
matching a no-op trigger response. Configured triggers still follow the
existing invocation and error handling. Added coverage compares absent
and no-op triggers, checks required decisions and configured-trigger
failures, and exercises multiple challenge rounds through both admin and
non-admin APIs, including session reuse rejection and token issuance.
Fixes#6345
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
* feat(ses): add the v2 reputation entity operations
Implement ListReputationEntities, GetReputationEntity,
UpdateReputationEntityPolicy and UpdateReputationEntityCustomerManagedStatus.
Every tenant is a reputation entity referenced by its full ARN. The policy
and the customer-managed status live on the tenant record, and the status
is the tenant's aggregate SendingStatus. A tenant whose status is DISABLED
is now refused on SendEmail and SendBulkEmail with MessageRejected.
Shapes, messages and validation order follow probes against real SES.
* test(ses): surface unexpected tenant cleanup failures in the reputation compat test
Load an opt-in regional catalog when EC2 is enabled, canonicalize and validate its IPv4 entries, and reuse the read-only discovery and security-group paths. Resolve AWS-managed CIDRs for policy evaluation and firewall generation alongside customer-managed lists.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Use one reentrant pass lock for scheduled and direct ECS reconciliation. Retain direct fixture ticks and add deterministic contention coverage for both entry points, preserving the exact desired task count.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
A Task can now use the six optimized EMR Serverless integrations the
Step Functions guide lists: createApplication, startApplication,
stopApplication, deleteApplication, startJobRun and cancelJobRun, each
request-response and .sync. Each calls Floci's EMR Serverless in the
state machine's Region. They failed with "Unsupported resource" before.
A Task names the API's members in PascalCase where the API writes them
in camelCase, so a request and a response are mapped against botocore's
EMR Serverless model, now vendored as aws/emr-serverless-shapes.json by
tools/aws/regen_emr_serverless_shapes.py: a structure's members are
renamed, a map keeps the keys the state machine wrote (tags,
InitialCapacity's DRIVER, a configuration's Properties such as
spark.executor.memory), and a member the model does not have is
dropped. A member, ApplicationId and JobRunId included, may be written
in either case. One the model has and Floci's request class lacks is
refused rather than dropped, and a test holds the classes to the model.
request_shapes.py can now keep output shapes for it. A request
without ClientToken gets a random one, as the SDK fills an idempotency
token in; the guide's examples leave it out.
The result is the API's response in PascalCase, or {"ApplicationId"}
where the API answers nothing, as the guide's table says. The guide
finds no difference between a .sync response and the API's, so a .sync
result is the starting call's own: state machines read a
createApplication.sync result's ApplicationId and a startJobRun.sync
result's JobRunId. A .sync Task records TaskSubmitted and polls
GetApplication or GetJobRun until the state the guide names, as the
elasticmapreduce ones do; a run that ends FAILED or CANCELLED, or an
application that can no longer get there, fails the Task with
States.TaskFailed and the describe response as the cause. A wait that
ends early cancels the run of a startJobRun.sync, stops the application
of a startApplication.sync and deletes the one a createApplication.sync
made, the call each integration's IAM policy grants beyond its own and
its read. EMR Serverless answering that the application or run is gone
or past undoing is logged and leaves the Task ending as it was; any
other failure is raised.
An EMR Serverless error keeps its code under EmrServerless., the
exception prefix the guide gives the service; no record shows the
optimized integration's. A Task without the ApplicationId, or a
cancelJobRun without the JobRunId, it acts on fails with
States.TaskFailed before EMR Serverless sees it.
CreateApplication now stores the configurations UpdateApplication
already did (runtime, monitoring, scheduler, disk encryption,
interactive, Identity Center and job-level cost allocation), and
ImageConfiguration keeps applicationLevelDigestResolution. Both were
dropped, from a Task and from the API alike. A runtime configuration
kept only its properties, lifted out of their member: Jackson bound the
properties member to the field of that name holding every member read.
It keeps its classification and properties now, on update as well.
GetApplication no longer returns the application's clientToken, which
its Application has no member for and which the .sync waits read. The
token stays with the stored application, which CreateApplication's
retries are matched on.
The .sync wait loop the elasticmapreduce integrations had is now shared
by both, as are their request and failure helpers, and the two EMR
Step Functions tests share their state machine helpers.
Part of #6046 (part 11).
Under IAM enforcement an RDS or DMS request that names a role went through without iam:PassRole on
it. AWS's Service Reference lists iam:PassRole, passed to rds.amazonaws.com or dms.amazonaws.com,
for each of these operations, so a caller allowed to change a database could attach any role in
the account to it.
RDS, to rds.amazonaws.com:
- AddRoleToDBCluster, AddRoleToDBInstance, RemoveRoleFromDBCluster, RemoveRoleFromDBInstance,
CreateDBProxy and ModifyDBProxy pass RoleArn, and StartExportTask passes IamRoleArn;
- CreateDBInstance, CreateDBInstanceReadReplica, ModifyDBInstance, CreateDBCluster,
ModifyDBCluster, RestoreDBClusterFromSnapshot and RestoreDBClusterToPointInTime pass the
Enhanced Monitoring role, MonitoringRoleArn ("The user that enables Enhanced Monitoring must be
granted the PassRole permission.");
- they, RestoreDBInstanceFromDBSnapshot and RestoreDBInstanceToPointInTime pass the directory role
DomainIAMRoleName names, checked on the ARN IAM holds it under, since the name carries no path;
- CreateDBCluster and the two cluster restores pass each role in AssociatedRoles, at any index and
in either list form, as the RDS handler reads them;
- ModifyOptionGroup passes the role each option it includes takes in its IAM_ROLE_ARN setting, as
SQL Server's native backup and audit options do, read as the handler reads OptionsToInclude.
DMS, to dms.amazonaws.com: CreateEndpoint and ModifyEndpoint pass ServiceAccessRoleArn and the
role members the DMS model gives each engine's settings structure (ServiceAccessRoleArn,
SecretsManagerAccessRoleArn, SecretsManagerOracleAsmAccessRoleArn), and CreateReplicationInstance
and ModifyReplicationInstance pass KerberosAuthenticationSettings.KeyCacheSecretIamArn.
docs/services/iam.md lists the operations and the roles they pass.
Under IAM enforcement a REST request whose route no rule maps is let through unchecked. No EKS
route had a rule, so any signed caller could create, read, change or delete clusters, node groups,
Fargate profiles, add-ons, access entries and Pod Identity associations with no EKS permission, and
without iam:PassRole on the roles they named. A Pod Identity association hands its service
account's pods the credentials of its role, so a caller could have pods run as any role in the
account.
Every operation of the eks model 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, and
IamRestRouteCoverageTest checks the whole model. Floci takes an access entry's principal as the
rest of the path, so a GET or DELETE under an entry reads or deletes an entry: the entry's access
policy routes, which Floci does not serve, run as DescribeAccessEntry and DeleteAccessEntry and are
checked as those.
Each is checked against the resource the reference gives it, in the caller's account, where EKS
looks everything up:
- a cluster against the ARN EKS holds it under, or cluster/<name> in the request's Region for one
it holds none of, and CreateCluster against the cluster its body names, as the EKS user guide's
example policy for creating a cluster grants it;
- a node group, Fargate profile, add-on, access entry or Pod Identity association against the ARN
EKS holds it under, which ends in an id the request does not carry, read through
EksService.findResourceArn with the lookups its handlers make; listing and creating them, and the
other routes under a cluster, against the cluster;
- DescribeUpdate against the add-on the update was made to, since the updates Floci keeps are its
add-ons' and EKS returns one whether or not the request names its add-on, and otherwise the
cluster;
- a tagging request against the caller's cluster named after the ARN's last /, as EKS tags it.
The roles each operation passes need iam:PassRole, with iam:PassedToService the value the Service
Reference gives: the cluster role, node role, Fargate pod execution role and an add-on's service
account and Pod Identity roles go to eks.amazonaws.com, a Pod Identity association's roleArn to
pods.eks.amazonaws.com ("The IAM principal that is creating the association must have
iam:PassRole."), and an EC2_LINUX or EC2_WINDOWS access entry's principal to ec2.amazonaws.com.
The router also matches a path with a trailing slash as the path without it, while the rules
matched the slash: POST /clusters/, GET /schedules/ and GET /2015-03-31/functions/<name>/ reached
their operation unchecked. A route is now matched without its trailing slash, as the router
matches it. An S3 path is matched as sent, as before: an S3 key may end in a slash, as a folder
marker's does, and S3's rules already take a bucket's one trailing slash.
docs/services/iam.md says which EKS routes are mapped, what each is checked against and the roles
they pass.
* fix(rds): run MySQL and MariaDB with their parameter group values
A DB cluster parameter group or DB parameter group was stored but never
reached the engine: the container started with only the authentication
option, so the database kept MySQL's built-in defaults.
Every container start (create, reboot, stop and start, emulator restart)
now passes the group's overrides as --loose-<name>=<value> server options:
the cluster parameter group for a cluster, the DB parameter group for a
standalone instance. The loose prefix makes the server skip an Aurora-only
parameter with a warning. Formula values and the parameters that decide
where the server listens and keeps its data are left out, and Floci's
authentication options come last so the proxy keeps working.
DescribeDBClusters now reports DBClusterParameterGroup.
Fixes#5946
* fix(rds): layer the Aurora writer's parameter group and switch groups on modify
Review follow-up:
- require_secure_transport and skip_grant_tables are no longer passed to
the server, like port and socket: Floci's proxy talks to MySQL without
TLS, and skip_grant_tables turns networking off, so either would lock
every client out.
- An Aurora cluster's engine now runs with its DB cluster parameter group
and the writer instance's DB parameter group on top, so an
instance-level value such as max_connections reaches the database.
Creating the writer restarts the cluster's container when its group
changes the engine's options; every later start reads the writer's
group too.
- ModifyDBCluster takes DBClusterParameterGroupName and ModifyDBInstance
takes DBParameterGroupName. The group is checked against the engine
before anything else in the request is applied, recorded at once, and
used from the database's next start (a reboot), as on AWS.
* fix(rds): apply Aurora groups on a writer reboot and report incompatible-parameters
Review follow-up:
- RebootDBInstance on an Aurora cluster's writer restarts the database the
cluster's members share, which is how AWS applies a changed DB cluster
parameter group or writer DB parameter group. A reader's reboot still
only restarts its endpoint.
- time_zone reaches the server as --default-time-zone, since MySQL has no
time_zone option, and Aurora's binlog_format=OFF, which turns binary
logging off and which MySQL refuses as a value, as --skip-log-bin.
- A server that stops while starting with its parameter group's options
leaves no container, and its instance, or every member of its cluster,
reports incompatible-parameters until a reboot starts it with values the
server accepts. Floci logs the server's error lines.
- DescribeDBClusters names a default DB cluster parameter group only when
DescribeDBClusterParameterGroups lists it.
- The integration test reboots the writer rather than the cluster, checks
that binary logging is off, covers a refused value, and skips through
RdsRequests.assumeDocker.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
* feat(lambdaweb): serve the Lambda metadata endpoint
AWS gives each environment AWS_LAMBDA_METADATA_API, AWS_LAMBDA_METADATA_TOKEN
and AWS_LAMBDA_RUNTIME_API, all at one server. It answers the zone id to a
Bearer token with any method, "Client.Unauthorized" with 401 to anything
else, Go's 404 to another path before the token, and a 307 to the clean
path.
* fix(lambdaweb): take the metadata port outside the Runtime API range
The width of that range is the Lambda concurrency, and its ports are only
reached over the Docker network, as any other port is. A listen that fails
now closes its server.
* fix(lambdaweb): start the metadata server before a start mints a session
A metadata server that could not start left the role session and the token
of an environment that never ran.
Use one private helper from create and createAndStart while preserving ordinary cleanup, ephemeral volume removal and suppressed cleanup failures.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Reclaim disposable anonymous volumes while preserving adopted containers during failed recovery. Retain pre-reboot dumps and failed cleanup ownership across partial teardown. Preserve the original database when only proxy shutdown fails. Share startup orchestration while retaining the opt-in cleanup policy.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Normalize subnet IPv6 responses and expose regional availability-zone network borders. Keep the read-only regional test at a unique execution order.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Every SES v2 operation reads its body through readOptionBody, now also
CreateEmailIdentity, CreateEmailTemplate, UpdateEmailTemplate,
CreateCustomVerificationEmailTemplate,
UpdateCustomVerificationEmailTemplate and TagResource, which read a body
that is not a JSON object as one without members. Only an empty body is
read as one without members; a whitespace-only body, malformed JSON and
anything but whitespace after the object are a SerializationException
without a message, as AWS answers them. The hand-rolled copies in the
tenant, contact, account, identity, import job, send, dedicated IP,
suppression and template controllers, which answered malformed JSON
with a BadRequestException carrying Jackson's message, are gone, and so
is the import job controller's own strict reader. The operations that
answer an empty body with "Request body is required." no longer give
that answer for a whitespace-only one.
* fix(cloudwatch): return empty CompositeAlarms and LogAlarms from DescribeAlarms
AWS sends every alarm collection even when it is empty. Floci only sent
MetricAlarms, so the AWS CLI's text output printed a leading None line
for each missing paginator result key.
Closes#6362
* test(cloudwatch): check empty alarm collections in sdk-test-python instead of bats
Drop the new AWS CLI bats file and assert the empty CompositeAlarms and
LogAlarms lists in the existing describe_alarms test, as boto3 leaves an
absent list out of the response.
Share plain, stored-name checked and explicit-account lookups while retaining validation order and owner selection.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Honor group preferences and inherited targets in the shared launch path. Preserve failed launch state, limit fallback to capacity shortages, and validate all supplied numeric Query target members. Reuse existing SDK coverage.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Normalize Route53 record identity without mutating records before batch commit. Reuse the shared ASCII record-name normalization for alias comparison, as requested in maintainer review.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Continue terminal statement eviction when receipt cleanup fails, preserving active and fresh statements across accounts.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Exercise idle expiration and heartbeat renewal with a controlled monotonic clock and scripted future waits. Keep production defaults on System.nanoTime and CompletableFuture.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Require reserved capacity for direct, template, Fleet and Auto Scaling launches. Preserve the targeted shortage message shared with restart. Keep CloudFormation timeout fixtures in their separate contribution.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(ec2): revoke security group rules by SecurityGroupRuleId
Both revoke operations read SecurityGroupRuleId.N and delete each named
rule, which also drops it from the group's IpPermissions. A rule id that
names no rule of the group in that direction fails the call with
InvalidSecurityGroupRuleId.NotFound and leaves every rule in place.
* fix(ec2): revoke prefix list and unresolved group rules by id
Removing a rule's peer matches its prefix list id, and a group reference
recorded without an id matches the pair that also has none. A permission
is dropped only once every source, prefix lists included, is gone. Revoke
by id checks and removes its rules under the group lock, and the tests
share one CIDR authorize helper.
* test(ec2): build every rule source through one authorize helper
The helper takes the action, prefix lists, CIDR and description, and declares its request as RequestSpecification.
Check the scoped log group before parsing a FilterLogEvents pattern. Reuse the missing-group error and cover missing, deleted, empty and populated groups through service and SDK tests.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat: support Redshift Data API client token idempotency
* test: verify Redshift Data API retry compatibility
* fix: address Redshift Data admission and cleanup races
* refactor(redshift-data): remove implicit in-memory receipt constructor
Match the IoT Data Long response contract instead of emitting floating-point seconds. Cover both retained read responses with fixed values, missing-timestamp controls, and SDK wire round trips.
Fold only ASCII DNS letters and accept an optional trailing dot while keeping distinct target values and rejected batches intact. Exercise compatibility cases using the suite endpoint.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(lambdaweb): check the execution role as AWS does
AWS refuses a revision whose execution role is in another account with
403 AccessDeniedException. It refuses a role that does not exist or does
not trust lambda.amazonaws.com with 400 ValidationException, and that
check gives no aws:SourceAccount or aws:SourceArn. An environment
assumes the role with the function as its source, and a request gets
502 Platform.CannotAssumeRole when Lambda can no longer assume it.
* fix(iam): match a wildcard principal and the service keys in service trust
{"AWS": "*"} lets Lambda assume a role, and a Deny on it refuses the role.
Lambda sets aws:PrincipalIsAWSService to true and aws:PrincipalServiceName
to its principal when it checks the role and when an environment assumes it.
* fix(lambdaweb): answer CannotAssumeRole when the role goes during a start
A role deleted after the trust check gave the container the account's
placeholder credentials. AWS answers 502 Platform.CannotAssumeRole for a
deleted role.
* fix(organizations): return OU and account paths
* fix(organizations): stabilize list path rendering
Render selected resources from request-local parent IDs without leaf rereads. Preserve scoped ancestry errors and tolerate concurrent removal or movement. Reduce account collection scans for a full 20-row page from 21 to 1.
* refactor(organizations): share ancestry walk and path format
Keep live, CloudFormation, and cached list paths on one traversal with caller-supplied parent lookups. Preserve scoped fallback and stale-row handling, and cover root-to-leaf path parity at three depths.
Retarget provisioned alias allocations while retaining quota and cleanup ownership. Isolate failed replacement writes or unsupported targets to their allocation so unrelated configurations continue reconciling. Retry the retained allocation when its target or storage recovers.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
ResourceNotFoundException for a missing log group, log stream or
subscription filter now carries AWS's fixed text, ending with a period
and without the resource name. PutLogEvents looks up the log group
before the stream, so a put to a missing group reports the group, as
AWS does, instead of the stream.
Closes#6338Closes#6339
Return ReservationCapacityExceeded when a matching targeted reservation lacks capacity at precheck or admission, including restart. Preserve mismatch errors and existing resource cleanup.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
SidecarConcurrency's SIDECAR_PERMITS map (added in #6262) never dropped its
entry when repositoryContainerId's container was released, so deleting a
CodeArtifact pypi repository leaked one Semaphore for the life of the
process. Reposilite's shared container key is unaffected since it never
tears down.
* fix(eventbridge): enforce tag resource ownership
* fix(eventbridge): resolve tag ARN partition from request region
* fix(eventbridge): report missing tag resources
* feat(redshift): support default IAM roles for COPY and UNLOAD
* fix(redshift): distinguish default role keyword from literals
* fix(redshift): accept blank default IAM roles
Delegated access has two ceilings and only one of them belongs to the request.
The twelve hours sessionDurationType declares are held at the filing, where
SessionDuration arrives. The other is the approver's, and the user guide's own
note states it: "The maximum duration for delegated access is 12 hours.
However, root users can only approve delegation requests with a duration of 4
hours or less. If a request specifies more than 4 hours, you must use a
non-root identity to approve the request." Nothing read it, so the account root
could approve a twelve-hour delegation and the credentials it bought ran that
long.
It is read at the approval rather than at the filing, because that is where the
approver is known: a request longer than four hours is refused for root and the
same request is approvable by an IAM user or role of that account, which is the
remedy the note itself names. Root is the caller whose ARN ends in :root, what
this family already names an approver by, and what a key naming no IAM user
resolves to, so approving a long request locally means signing as a user rather
than with a bare account id.
AcceptDelegationRequest models NoSuchEntity, ServiceFailure and
ConcurrentModification and nothing for this, and no source gives the code AWS
answers, so AccessDenied is chosen and recorded in docs/services/iam.md: the
guide states the rule as which identity may approve, which is what the
release's own OnlySendByOwner rule already answers that way.
Five tests. Three on the service: the refusal at five hours with the privileged
user then approving the same request, the cap itself approved at four hours
exactly, and twelve hours approved by a user to show the cap is the approver's.
Two over the wire: the same refusal where the account id is the signing key,
and the release's id check answered for an id that breaks its pattern rather
than one that is absent, which the absent half's test left uncovered.
* feat(msk): add SCRAM secret association metadata APIs
Add association, listing and disassociation endpoints with persisted metadata and secret validation. Broker user management and reconciliation follow separately.
* test(msk): enhance cleanup logic in MskTest for SCRAM secrets and KMS keys
* fix(msk): accept resolved secret ARNs with generated suffixes
* fix(msk): reject KMS alias ARNs for SCRAM secrets
Closes#6229
* fix(msk): reject partial secret ARNs with operation-specific errors
* fix(msk): clean up SCRAM associations for deleted clusters
Add scheduled, account-aware cleanup of association left after cluster delete
* fix(msk): allow disassociation of deleted SCRAM secrets
* feat(firehose): store and echo CloudWatchLoggingOptions on S3 destinations
CreateDeliveryStream and UpdateDestination silently dropped CloudWatchLoggingOptions because the S3 destination model had no such member. The block is now stored and echoed on both ExtendedS3DestinationDescription and S3DestinationDescription, defaulting to {"Enabled": false} when omitted, as real AWS does. UpdateDestination merges it member-wise, so an update naming only Enabled keeps the stored log group and stream.
* fix(cloudformation): forward Firehose processing and logging configuration
FirehoseCfnProvisioner now reads RoleARN, ErrorOutputPrefix, CloudWatchLoggingOptions and, for the extended S3 destination only, ProcessingConfiguration, resolving intrinsics before handing them to the service. A Lambda transform declared in a template therefore runs on delivery and is echoed by DescribeDeliveryStream, as on AWS. An omitted member stays null so an UpdateStack keeps the stored value, and an unreadable block fails the resource with ValidationError.
* test(cloudformation): cover a stack Firehose stream's Lambda transform end to end
A stack-created extended S3 stream now reads back its role, error prefix, logging options and
Lambda processor, runs that processor on delivery, and picks up a new function on UpdateStack.
* docs(firehose): describe logging options and the CloudFormation members applied
Document how CloudWatchLoggingOptions is stored, defaulted and merged on the S3 destinations, and note which DeliveryStream properties the CloudFormation provisioner applies.
* fix(cloudformation): validate a Firehose stream's forwarded destination like CreateDeliveryStream
The provisioner now runs the same wire-shape validation CreateDeliveryStream applies, so a bad processor or CompressionFormat fails the resource instead of being stored. A structured destination member present as anything but an object also fails rather than being silently dropped.
* docs(cloudformation): name every Firehose property the provisioner applies
* fix(firehose): validate CloudWatchLoggingOptions names against AWS constraints
LogGroupName and LogStreamName are now checked against AWS's 512-character bound and their modeled patterns, reporting both rules when both fail, as probed against real AWS.
* chore: retrigger CI after a transient npm publish race
native arm64 / sdk-test-node ran npm install between the publication of @aws-sdk/lib-storage 3.1156.0 and @aws-sdk/client-s3 3.1156.0, and failed with ERESOLVE.
* test(firehose): share the delivery and Lambda transform helpers in FirehoseRequests
Moves encode, putRecordBatch, firstKey and the record-id driven Lambda transform answer out of CloudFormationFirehoseIntegrationTest and FirehoseLambdaTransformIntegrationTest into one testing fixture both now use.
* fix(firehose): require both log names when CloudWatch logging is enabled
With Enabled true, a missing or empty LogGroupName or LogStreamName is now refused with AWS's InvalidArgumentException, group before stream, on the merged result for UpdateDestination and ahead of the other semantic checks, as probed against real AWS.
* fix(firehose): fill the defaults on a Redshift destination's S3 backup
Create and describe now apply the S3 defaults, including CloudWatchLoggingOptions Enabled false, to a Redshift destination's backup configuration as well as its intermediate one, so persisted streams heal on read.
* feat(sqs): publish AWS/SQS queue metrics to CloudWatch
Every active queue now reports the AWS/SQS metrics once a minute on the
QueueName dimension: the depth gauges, ApproximateAgeOfOldestMessage, the
send, receive, delete and empty-receive counters, SentMessageSize, and for
FIFO queues the in-flight groups and deduplicated sends. The samples follow
what SQS sends on AWS, so alarms, GetMetricData and GetMetricStatistics see
queue metrics without PutMetricData.
The CloudWatch metric store is now journaled under persistent mode, as the
CloudWatch Logs event store is, since it takes a write per metric per active
queue every minute.
Closes#6275
* fix(sqs): stamp queue metrics with the minute that ended
The publisher now ticks just after each minute boundary and stamps its
samples with the minute that ended, so a call counts in the minute it was
made instead of the minute of a startup-relative tick. A queue whose write
fails no longer stops the others, and the log names it. A queue deleted and
created again between the snapshot and the lookup is skipped instead of
reporting the old queue's depth under the new one.
* fix(sqs): bound AWS/SQS metric history and finish the tick on shutdown
The publisher now drops AWS/SQS datapoints older than the 15 days AWS keeps
one-minute data, once an hour, so the history it generates for an active
queue stays bounded. On shutdown it stops before the storage flush and waits
for a running tick, so the last minute is not written after the store closed.
* test(sqs): keep the scheduled metrics tick out of the test run
The acceptance test publishes its own ticks, but the scheduled one could
still stamp the test queue's depth into a complete period newer than them,
since a tick stamps the minute that just ended. floci.services.sqs.
cloudwatch-metrics-enabled now turns the tick off, and the test
configuration does, as it does for the S3 lifecycle sweep. It also lets a
user opt out of the AWS/SQS metric volume.
* test(sqs): build the metrics test's queue service with SqsServiceFactory
EksService restores persisted clusters in @PostConstruct, but CDI creates
the bean on first use. After a restart no cluster's k3s container came
back until something called the EKS API, so workloads on it stayed down.
EmulatorLifecycle now calls EksService.restorePersistedRuntime from
onHttpStart, after the start and ready hooks. It waits for the IMDS server
to start, because a recreated cluster's Pod Identity and IMDS relays probe
Floci's HTTP port and IMDS before they route pod traffic there. It runs
after the hooks so they and the ready line don't wait minutes for k3s.
If the restore throws, it is logged and the emulator stays up; EKS
requests retry creating the service, as before.
EksBootRestoreIntegrationTest boots a fresh application with EKS out of
mock mode and checks EksService was created without an EKS request, as
EcsBootReconcilerIntegrationTest does for ECS. Its profile pins the HTTP
port, since onHttpStart acts only on quarkus.http.port.
Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>