Commit Graph
624 Commits
Author SHA1 Message Date
Brian Taylor 2a4ca61baf fix(cognito): delete a user pool's records with the pool (#2949)
* fix(cognito): delete a user pool's app clients, revocations and codes

#3419 took users and resource servers out with the pool, closing the half of
#2864 that was reported. Three more record types are the same defect and were
left behind: app clients, revoked token records and outstanding verification
codes.

On AWS a pool id is never reused, so nothing can inherit an orphan. Here
floci:override-id makes ids caller-chosen and therefore reusable, and a pool
recreated on a pinned id picks up whatever the deleted pool left.

Reproduced by pinning us-east-1_orphanprobe1, populating it, deleting the pool
and recreating it on the same id. The client leak is the serious one: the
deleted pool's client id kept resolving against the new pool, carrying a secret
the new pool's caller never saw.

  clients: ["c1"]
  describe-user-pool-client --client-id c1a93e3fc698451d96ed406adb -> c1

Clients are keyed by client id alone, so they are found by their userPoolId
field rather than a key prefix. Revoked tokens and verification codes have
their keys collected before deleting so the backing key set is not modified
while it is being iterated.

confirmSignUpNamesDeletedUserPoolInResourceNotFoundMessage, added by #2936,
built its orphaned client by deleting the client's pool, which this cascade
now prevents. It is renamed and reaches the same defensive path by dropping the
pool record alone, and a second case pins the new behaviour: a client id from a
deleted pool is gone with it.

Refs #2864

* fix(cognito): bound the delete cascade by pool ownership, not key prefix

floci:override-id makes pool ids caller-chosen, and validateOverrideId
permits a colon. Two live pools can therefore be named so that one id
plus the key separator is a prefix of the other, and the revoked-token
and verification-code cascades deleted by the matched key, so deleting
the shorter pool erased the longer one's records. For revoked tokens
that reinstated tokens the surviving pool had revoked.

Both records carry their own userPoolId, so ownership is now settled by
that field rather than by the key prefix. The other cascades reconstruct
the key from the pool id being deleted and so never reached across a
boundary; they are left alone.

A jti can itself contain a colon (global revocations use
global:{username}), so bounding the prefix by the separator would not
have been sufficient either.
2026-09-12 23:39:32 -04:00
lex00andlex00 5d0b0b44b1 fix(ec2): store and validate CreateVpcEndpoint SubnetConfiguration (#3491)
* fix(ec2): store and validate CreateVpcEndpoint SubnetConfiguration

CreateVpcEndpoint accepted SubnetConfiguration.N and dropped it, so an
interface endpoint took floci's own synthesized address in each subnet rather
than the one the caller pinned. Terraform's aws_vpc_endpoint sends the
subnet_configuration block on create and reads it back by following the
endpoint to its network interfaces, so every plan after the apply saw an
address it never asked for and proposed replacing the endpoint.

SubnetConfiguration is request-only in ec2/2016-11-15. No output shape carries
it, so the addresses are stored on the endpoint and consumed when its
interfaces are built, and DescribeVpcEndpoints echoes nothing new.

Ec2QueryHandler parses the flattened SubnetConfiguration.N list for
CreateVpcEndpoint and for ModifyVpcEndpoint, which takes the same parameter.
Ec2Service validates each entry against the named subnet, rejecting an IPv4
address outside its CIDR with InvalidParameterValue, and keeps the pinned
address on the endpoint's interface in that subnet. A subnet named only
through its configuration joins the endpoint's subnet set. Ipv6 is stored as
given, since floci's subnets carry no IPv6 CIDR to validate against and its
network interfaces have no IPv6 field yet.

Adds Ec2VpcEndpointSubnetConfigurationIntegrationTest over the query wire and
three Ec2ServiceTest cases for the create, modify and rejection paths.

* fix(ec2): reject the subnet-reserved addresses in SubnetConfiguration

validateSubnetConfigurations only checked that SubnetConfiguration.Ipv4 parsed
and fell inside the named subnet's CIDR. For a 10.61.1.0/24 subnet that let
10.61.1.0, .1, .2, .3 and .255 through, and each became the private address of
the endpoint's network interface. AWS keeps those five for itself, so none of
them can be assigned to a resource and no real endpoint could ever report one.

The rule is in ec2/2016-11-15 itself, in the CreateSubnet documentation:
"Amazon Web Services reserves both the first four and the last IPv4 address in
each subnet's CIDR block. They're not available for your use." CreateSecondarySubnet
says the same for secondary subnets. No constraint key carries it, and no shape
in the model states it for SubnetConfiguration.

Ipv4Cidrs.isSubnetReserved is new; the EC2 service had no reserved-address helper
to reuse. VpcNetworkManager.firstHostOffset looks close but is not the same rule:
it reserves ten addresses of Docker-network headroom at the bottom of a block and
nothing at the top, for allocation readability rather than AWS semantics.

Small blocks need no special case. A /28, the smallest subnet AWS accepts, keeps
11 of its 16 addresses and a /29 keeps three. Both ends are clamped so they cannot
cross in a block of four addresses or fewer, where every address is reserved.

The check sits in the shared validator, so CreateVpcEndpoint and ModifyVpcEndpoint
both refuse a reserved address with the InvalidParameterValue the containment check
already raises. Tests cover all five reserved addresses and one ordinary host
address on the create path, the modify path, a /28 subnet, and the query wire.

---------

Co-authored-by: lex00 <artigues.dev@gmail.com>
2026-09-12 22:32:12 -04:00
lex00 fe40e06938 feat(ec2): support snapshot block public access (#3490)
* feat(ec2): support snapshot block public access

Adds EnableSnapshotBlockPublicAccess, DisableSnapshotBlockPublicAccess and
GetSnapshotBlockPublicAccessState over the EC2 Query protocol.

The setting is account-level state scoped to one region, so it lives in a small
Ec2SnapshotBlockPublicAccessService keyed by region, mirroring
Ec2EbsEncryptionService. The account-aware storage backend namespaces the keys by
the calling credential's account. A region that was never configured reads back
unblocked.

Enable accepts only block-all-sharing and block-new-sharing, per the EC2 model,
and rejects unblocked with InvalidParameterValue. Disable returns the resulting
unblocked rather than the prior state. Only the Get response carries managedBy,
always account, since Floci has no declarative-policy layer.

* fix(ec2): honor DryRun on snapshot block public access

EnableSnapshotBlockPublicAccess, DisableSnapshotBlockPublicAccess and
GetSnapshotBlockPublicAccessState all model the standard DryRun parameter, but
none of the three handlers checked it. Enable persisted the requested state,
Disable persisted unblocked and Get answered 200, so DryRun=true had real side
effects on both write paths.

All three handlers now take the parameter map and call the existing
checkDryRun(params). Enable validates State first, through a new
validateEnableState on the service, because AWS reports an invalid parameter
ahead of DryRunOperation and only returns DryRunOperation once the request
would otherwise have succeeded. So State=unblocked with DryRun=true still
fails with InvalidParameterValue, and a missing State still fails with
MissingParameter.
2026-09-12 20:21:34 -04:00
lex00 cebb011a00 fix(autoscaling): round-trip the dropped Auto Scaling group fields (#3494)
* fix(autoscaling): round-trip the dropped Auto Scaling group fields

CreateAutoScalingGroup and UpdateAutoScalingGroup accepted DesiredCapacityType,
CapacityRebalance, MaxInstanceLifetime and DefaultInstanceWarmup and threw them
away, so DescribeAutoScalingGroups never read them back. A mixed instances policy
launch template override that selected instance types by InstanceRequirements
instead of by name was dropped the same way, and because the override parser used
InstanceType's presence as its only "is there another override" signal, such an
override also truncated the whole Overrides list.

The four scalar members now travel into AutoScalingService as one AsgOptionalFields
record and are stored on AutoScalingGroup as boxed, uninitialised fields, so a group
that never set one omits it from the Describe response rather than reporting a
default. Update keeps its partial-update semantics: an absent member leaves the
stored value alone. DefaultInstanceWarmup honours the documented -1 removal
sentinel, MaxInstanceLifetime must be 0 or at least 86400, and DesiredCapacityType
is checked against units, vcpu and memory-mib.

LaunchTemplateOverrides.InstanceRequirements parses and echoes every member of the
botocore shape except BaselinePerformanceFactors, and an override that sets both
InstanceType and InstanceRequirements raises ValidationError as AWS does.

Verified against botocore autoscaling/2011-01-01/service-2.json from awscli 2.35.24.

* fix(autoscaling): enforce the attribute-based instance selection rules

Two rules that botocore states but does not encode as constraints were missing.

DesiredCapacityType is typed XmlStringMaxLen255 with no enum, and
CreateAutoScalingGroupType.members.DesiredCapacityType.documentation carries the
rule: "Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based
instance type selection only." Floci accepted vcpu and memory-mib for a group
whose launch template names a fixed instance type. Both values now raise
ValidationError unless the mixed instances policy left in effect by the request
carries a launch template override with a non-empty InstanceRequirements. units
is the documented default and stays legal everywhere, and an absent member is
not validated.

The effective policy is the one the request supplies on create. On update it is
the policy the request supplies, the stored policy when the request names no
launch source, or none when the request switches the group to a launch
configuration or a plain launch template. The effective DesiredCapacityType is
likewise the request value or, when absent, the stored one, so an update cannot
strip attribute-based selection out from under a stored vcpu.

shapes.InstanceRequirements.required is ["VCpuCount", "MemoryMiB"] and the shape
documentation repeats it as "You must specify VCpuCount and MemoryMiB". An
override carrying InstanceRequirements without both ranges was stored and
returned 200; it now raises ValidationError. Both rules run on create and on
update.

createGroupCarryingEveryOptionalField is @Order(1) and seeds the group the later
ordered tests reuse, so its setup moved from a launch template naming t3.micro
to a mixed instances policy whose override sets VCpuCount and MemoryMiB. That
makes its DesiredCapacityType=vcpu legal without relaxing any assertion, and the
ordered updates that follow still see attribute-based selection in effect.
2026-09-12 18:37:36 -05:00
Niels Kootstra 2104b33ea7 fix(codepipeline): cap QUEUED and PARALLEL pipelines at 50 active executions (#3503)
AWS allows at most 50 concurrent executions per QUEUED or PARALLEL
pipeline. StartPipelineExecution now counts the pipeline's InProgress
and Stopping executions under a per-pipeline admission lock and returns
ConcurrentPipelineExecutionsLimitExceededException at the limit. The
admission lock is separate from the monitor a QUEUED worker holds for
its whole run, so a start never waits for the running execution.

A start that reaches the executor after shutdown is persisted as Failed
and returns ConflictException instead of leaking
RejectedExecutionException. Shutdown waits up to five seconds for
execution workers to stop so their final status writes complete before
the process exits.
2026-09-12 14:25:07 -04:00
Ovidiu (Ovi)andOvidiu ea5925f630 feat(athena): add UpdateWorkGroup support (#3468)
* feat(athena): add UpdateWorkGroup support

* fix(athena): validate workgroup configuration updates

---------

Co-authored-by: Ovidiu (Ovi) <462561+ovidiubute@users.noreply.github.com>
2026-09-12 14:15:00 -04:00
Niels Kootstra 6507f32aea fix(firehose): keep buffered records when S3 delivery fails (#3471)
* fix(firehose): keep buffered records when S3 delivery fails

A failed S3 write dropped the batch it was delivering. Records that came in
through PutRecord were lost; records polled from a Kinesis source were only
recovered by re-reading from the committed checkpoint.

A failed delivery now restores the batch at the front of the buffer, ahead
of records that arrived while the write was in flight, keeps the buffer's
original start time so the next scheduled tick retries it, and re-pends the
source checkpoint so a later successful delivery commits it. Successful
delivery, compression and the scheduled flush are unchanged.

* fix(firehose): serialize delivery per stream so a later flush cannot commit past an unresolved batch

The buffer monitor only made the snapshot atomic. A poll that had read past
a first flush's checkpoint could buffer its records after that flush took
the pending position, and a second flush would then deliver them and commit
a position past the first batch while its S3 write was still in flight. If
that write failed, the durable checkpoint already sat past records that
were only buffered for retry, and a restart before the retry skipped them.

One delivery at a time per stream, from taking the buffer to committing or
restoring its checkpoint, closes that window; the poller keeps buffering
under the buffer lock alone, so a slow write never stalls a poll.

* docs(firehose): a failed S3 write now keeps its batch buffered

* docs(firehose): drop the stale no-retry note in the Parquet converter
2026-09-12 13:50:21 -04:00
Franklin G. Mendoza e0d43189f7 fix(build): publish arm64 baseline release image (#3461) 2026-09-12 11:15:52 -05:00
Priamo Germosen d429d107ff fix(mwaa): apply AirflowConfigurationOptions to the Airflow container (#3457)
CreateEnvironment stored and GetEnvironment echoed back
AirflowConfigurationOptions, but nothing translated it into the
container's actual configuration, so a DAG reading a custom
conf.get("section", "key") value at import time or task-run time got
nothing back, even though GetEnvironment reported the option as
configured.

Added MwaaEnvironmentManager.airflowConfigurationOptionsEnv, which
converts each AWS "section.key" entry into the AIRFLOW__SECTION__KEY
environment variable real Amazon MWAA sets for the same option, and
wired it into startAirflowContainer's env list. A malformed key (no
"section.key" dot on both sides) or one that would collide with a
variable Floci itself manages (PROTECTED_ENV_VARS: the executor,
database connection, security keys) is skipped and logged rather than
silently breaking the environment's required wiring.

Since this map now genuinely does something instead of being inert,
also added the validation CreateEnvironment's botocore model declares
for it (a 1-64 character key matching [a-z]+([a-z0-9._]*[a-z0-9_]+)?,
a 1-65536 character printable-ASCII value) as a server-side
ValidationException: the AWS SDKs enforce this client-side, but Floci
is also reachable via raw HTTP/CLI --cli-input-json, which bypasses
that, and an oversized or malformed entry should be rejected before
Docker container creation rather than passed through.

Fixes #3436
2026-09-12 11:11:23 -05:00
Franklin G. Mendoza a985773611 feat(bcm-pricing-calculator): emulate workload estimates (#3441)
* feat(bcm-pricing-calculator): emulate workload estimates

* fix(bcm-pricing-calculator): serialize timestamps as epoch seconds

* fix(bcm-pricing-calculator): align idempotency and errors
2026-09-12 11:31:20 -04:00
Franklin G. Mendoza a0fd815366 feat(oam): emulate observability access manager (#3440)
* feat(oam): emulate observability access manager

* fix(oam): honor explicit deny statements
2026-09-12 08:59:21 -04:00
Franklin G. Mendoza 68c783b576 fix(rds): report backing container failures (#3455)
* fix(rds): reconcile dead backing containers

* fix(rds): report backing container failures
2026-09-12 00:25:39 -05:00
Priamo Germosen fe076212c2 fix(mwaa): also detect a crashed sibling Postgres container, not just Airflow (#3454)
hasAirflowContainerExited only inspected the Airflow container. If the
sibling Postgres container dies instead (out of memory, its volume
filling up), Airflow keeps running but never reports metadatabase
healthy, so the environment sat at CREATING exactly as before this
existed, the same failure mode #3446 fixed for the Airflow container
alone.

Generalized into hasAnyContainerExited, backed by a shared per-container
helper, checking both Environment.getDbContainerId() and
getAirflowContainerId(). checkReadiness and its log messages updated to
match; behavior for a lone Airflow-container failure is unchanged.

Follow-up from hectorvent's review on #3446.
2026-09-12 00:20:38 -05:00
Hector Ventura 75a5111f6e docs: standardize Java code style rules (#3451)
* docs: standardize Java code style rules

AGENTS.md becomes the canonical Code Style source, regrouped into General,
Types and names, Imports, conventions the codebase already follows, and Tests.

Two new rules: write explicit types rather than var, and import classes rather
than writing fully-qualified names inline. Both are stated with the reason they
matter here, that the concrete type at a call site is usually what a wire
contract reviewer needs to see, and with the one exception each: record
deconstruction patterns for var, and genuine same-file name collisions for
qualified names.

The rest is existing practice written down so it stays true. Each claim was
measured against src/main and src/test: no printStackTrace, no logger field
named anything but LOG, no Calendar and no SimpleDateFormat. The System.out
rule exempts CLI entry points under tools/, which is its one real use. The
empty-catch rule now blesses naming the variable ignored or expected, the
convention the code already uses.

Two conventions are stated with the exceptions the tree actually contains
rather than as absolutes. java.util.Date survives where a third-party
signature forces it, in the BouncyCastle certificate builder and the JAX-RS
HttpHeaders.getDate() override, so the rule is java.time on Floci's side and
conversion at that boundary. Tab indentation is banned as such, since a JSON
text block may legitimately contain a tab as string content.

CONTRIBUTING.md and docs/contributing.md had no code style section at all, and
copilot-instructions.md had no code style content, so PR review could not flag
either new rule. The Copilot entry also lists the collisions it must not flag.

Existing code does not satisfy these everywhere. The rules are documentation
only: nothing in CI enforces them, and no Java file changes here.

* docs: correct the measured claims in the code style section

Review on #3451 caught that System.out is not confined to the tools CLI: four
test files print too. Checking the rest of the section the same way found five
more claims that do not survive a measurement, so this corrects all six rather
than only the reported one. The section's whole value is that a reader can trust
it without re-measuring.

System.out and System.err are now scoped to src/main, the way the wildcard
import rule already splits src/main from tests. The exception is named by its
real coordinates: AmiImageTool sits in the Java package
io.github.hectorvent.floci.tools.ami, not in the top-level tools/ directory,
which holds only tools/docs. printStackTrace stays absolute, since that one
holds: zero in src/main and src/test.

The Date rule listed two forced boundaries and there are three. BouncyCastle's
certificate builder and the JAX-RS HttpHeaders.getDate() override are joined by
JDBC's java.sql.Date, which extends java.util.Date and which the old wording
read as prohibiting, in RdsDataFieldMapper and RdsDataSqlParameters.

Optional is split, because half the claim was true. Never a field is exact,
there are none. Never a parameter was wrong: Quarkus threads
@ConfigProperty Optional<T> values through parameters in ResolvedServiceCatalog,
ContainerBuilder, DockerClientProducer and LaunchedContainerAwsEnv.

The three Tests rules each asserted something false. testX is not absent, it
names 291 methods across 52 files, so it is described as the older pattern not
to copy rather than as something that never happens. AssertJ is not absent
either, it is a declared test dependency used by the six Lambda launcher tests.
@DisplayName is genuinely rare in src/test, 13 files of 1455, but it is the norm
in compatibility-tests at 183 of 208, as is AssertJ at 197 of 208. That module
has the opposite idiom, so the Tests rules now say they describe src/test and
point a contributor at the module they are in.

Documentation only. No Java file changes here.
2026-09-11 23:23:51 -04:00
Priamo Germosen 2a682a6875 fix(mwaa): mark CREATE_FAILED when the Airflow container exits before becoming ready (#3446)
docker start only launches the entrypoint and returns immediately, so a
startup script or `airflow db migrate` failing partway through never
surfaced anywhere: the readiness poller only checked isReady() and had no
path back to a failure status, so the environment reported CREATING
forever instead of CREATE_FAILED.

MwaaEnvironmentManager.hasAirflowContainerExited inspects the container's
running state (docker-removed counts as exited too), and the readiness
poller (extracted into checkReadiness for direct testability) now marks
CREATE_FAILED when isReady() is false and the container has exited.

Two things this needed to stay safe under concurrency and partial
failure, both of which isReady() already handles and this had to match:

- isReady()/hasAirflowContainerExited() are blocking Docker/HTTP calls,
  wide enough for a concurrent DeleteEnvironment (which sets DELETING on
  the same Environment instance before tearing down its containers) to
  have moved the environment past CREATING in the meantime. checkReadiness
  re-checks the status immediately before writing, in both branches, so it
  can't resurrect a just-deleted environment into storage with a status
  decided from stale, pre-delete information.
- hasAirflowContainerExited only treats NotFoundException (the container
  is actually gone) as exited; any other Docker error is inconclusive and
  must not propagate, since the readiness poller shares one loop across
  every CREATING environment and an uncaught exception from one
  environment's check would otherwise skip every other environment for
  that poll tick, the same failure mode isReady()'s own catch-all already
  avoids.

Fixes #3437
2026-09-11 22:38:06 -04:00
lex00andlex00 128d3ef181 feat(datasync): add the DataSync management plane (#3377)
* feat(datasync): add the DataSync management plane

Emulates the AWS DataSync management API over JSON (X-Amz-Target
FmrsService.<Action>, signing name datasync): agents, the eleven
CreateLocation/DescribeLocation/UpdateLocation trios plus the shared
ListLocations and DeleteLocation, tasks, and resource tagging.

Each DescribeLocation* projects the create request that produced the
location, so the configuration that went in is the configuration that comes
back, and LocationUri is derived from that request per the scheme AWS
documents for the type. DescribeAgent reports ONLINE and DescribeTask reports
AVAILABLE from the first read, which is what the Terraform provider's
aws_datasync_task waits on. Credential members (Password, SecretKey,
SasConfiguration, the Kerberos files and the nested Protocol.SMB.Password)
are dropped before the configuration is stored, as AWS never reads them back
either. Errors use InvalidRequestException, the only client error the
DataSync model declares.

The task-execution data plane (StartTaskExecution, DescribeTaskExecution,
ListTaskExecutions, CancelTaskExecution, UpdateTaskExecution) transfers real
bytes between real storage systems and keeps raising UnknownOperationException
rather than a stub success.

* fix(datasync): default VerifyMode from the task mode

The DataSync model documents two VerifyMode defaults, not one:
POINT_IN_TIME_CONSISTENT for a BASIC task and ONLY_FILES_TRANSFERRED for an
ENHANCED one, which also cannot use POINT_IN_TIME_CONSISTENT at all. CreateTask
applied the BASIC default to every task, so an ENHANCED task created without an
explicit VerifyMode read back wrong.

The default now follows TaskMode, and a VerifyMode the mode does not support is
rejected with InvalidRequestException, the only client error this API declares.
UpdateTaskRequest carries no TaskMode, so a task keeps the mode it was created
with and UpdateTask applies the same rule against the stored mode. An
unrecognized TaskMode is rejected rather than silently treated as BASIC.

* test(datasync): add the SDK compatibility test

Drives an agent, an S3 and an NFS location, both task modes and the tag round
trip through the AWS SDK v2 DataSync client, which is the one piece of real-SDK
verification the RestAssured tests do not cover. It asserts the VerifyMode
default for a BASIC and an ENHANCED task, and that an ENHANCED task rejects
POINT_IN_TIME_CONSISTENT on create and on update.

---------

Co-authored-by: lex00 <artigues.dev@gmail.com>
2026-09-11 22:30:02 -04:00
Priamo Germosen 473a26aad9 fix(mwaa): match real MWAA's Airflow/Python pairing for the emulated image tag (#3445)
Real Amazon MWAA runs every Airflow version through 2.10.x on Python 3.11,
and only 2.11.0 onward (and every 3.x release) on Python 3.12. Floci
hardcoded apache/airflow:<version>-python3.12 for every supported version,
so a requirements.txt built the way AWS documents (a --constraint file
matching the real Airflow/Python pairing, e.g. constraints-3.11.txt for
2.9.x) resolves dependencies for the wrong Python minor version.

Fixes #3438
2026-09-11 20:54:52 -05:00
lex00 cae8f9a013 feat(bedrock): add guardrail lifecycle and versions (#3380)
* feat(bedrock): add guardrail lifecycle and versions

Amazon Bedrock control plane over REST JSON: CreateGuardrail through
DeleteGuardrail, CreateGuardrailVersion, ListGuardrails with pagination, and
resource tagging on /tagResource, /untagResource and /listTagsForResource.
Guardrails report READY on the first read, so the Terraform provider's status
poll for aws_bedrock_guardrail completes without a transition.

The control plane and bedrock-runtime both sign as "bedrock". The runtime
descriptor keeps that credential scope, and the new descriptor routes through
its resource class, which ServiceEnabledFilter checks first.

Policy blocks are stored under the read-shape member names, so a *Config
submitted on create or update reads back unsuffixed. ListGuardrails honours
maxResults and nextToken, and DeleteGuardrail rejects a guardrailVersion that
is not a GuardrailNumericalVersion.

* fix(bedrock): enforce guardrail length caps and resolve kmsKeyId to a key ARN

The AWS model caps description at 200 characters and both blockedInputMessaging
and blockedOutputsMessaging at 500, each with a minimum of 1. None of those were
checked, so an over-long value was stored and read back. name was already bounded
by its [0-9a-zA-Z-_]{1,50} pattern.

kmsKeyId on CreateGuardrail and UpdateGuardrail is a KmsKeyId: a key id, a key
ARN, an alias name or an alias ARN. kmsKeyArn on the read shapes is a KmsKeyArn,
which is only ever the full key ARN. The request value was echoed back verbatim,
so a bare key id or an alias produced a response that does not match the shape
GetGuardrail declares. It now resolves through KmsService.describeKey, the same
way RDS, DocDB and ElastiCache already resolve their KmsKeyId, and a key that is
missing, disabled or pending deletion is rejected with ValidationException.

* test(bedrock): drive the guardrail lifecycle from the AWS SDK v2 client

Adds the bedrock SDK module to the compatibility project, a BedrockClient
factory on TestFixtures, and a BedrockGuardrailTest covering create, read,
update, versioning, listing, tagging and delete. The test also submits kmsKeyId
as a bare key id and as an alias and asserts both read back as the same full KMS
key ARN.

* fix(bedrock): enforce the guardrail tag caps from the AWS model

The AWS model gives TagList a max of 200 items, and that shape backs the tags
member of both CreateGuardrail and TagResource. TooManyTagsException, declared
on both operations, documents a separate limit of 50 tags per resource counted
over the tags already on the resource together with the ones in the request.

parseTagList now rejects an array over 200 items with ValidationException, and
it moved to BedrockService so both entry points share it. CreateGuardrail and
TagResource raise TooManyTagsException once the total the guardrail would be
left holding passes 50, carrying resourceName as the model declares.
2026-09-11 20:36:45 -04:00
Franklin G. Mendoza 07d6cabd8a feat(marketplace-discovery): emulate AWS Marketplace Discovery API (#3342) 2026-09-11 18:48:30 -04:00
lex00 137a39add3 feat(appintegrations): add data and event integrations (#3379)
* feat(appintegrations): add data and event integrations

Amazon AppIntegrations over REST JSON, registered under the app-integrations
signing name: event integrations on /eventIntegrations, data integrations on
/dataIntegrations, and resource tagging through the shared /tags/{resourceArn}
dispatcher. Terraform's aws_appintegrations_event_integration and
aws_appintegrations_data_integration now round-trip against Floci instead of
failing on an unimplemented signing scope.

Event integrations are keyed by name, data integrations by generated id, and
both accept their own ARN wherever the API takes an identifier. The two PATCH
operations apply only the members present in the request body, matching how AWS
treats an optional member the caller did not send. Both tag writes answer 200,
which is what the 2020-07-29 model gives them.

* test(appintegrations): add an SDK compatibility test

Adds the appintegrations AWS SDK v2 module, a TestFixtures client factory,
and an AppIntegrationsTest that drives both integration types and the tag
round trip through the real SDK client.
2026-09-11 17:55:48 -04:00
lex00andlex00 2e79f5c766 feat(globalaccelerator): add the Global Accelerator management plane (#3378)
* feat(globalaccelerator): add the Global Accelerator management plane

Emulates the AWS Global Accelerator management plane over JSON 1.1 under the
GlobalAccelerator_V20180706 target prefix, signing name globalaccelerator:
accelerators, listeners, endpoint groups, accelerator attributes and resource
tags, 22 actions in all.

Global Accelerator is a global service, so ARNs carry an empty region segment
and listener and endpoint group ARNs extend the accelerator ARN. Nothing is
keyed by the signing region, so a caller that signs outside us-west-2 sees the
same accelerators. Accelerators report DEPLOYED and endpoints HEALTHY from the
first read, so SDK and Terraform waiters complete on their first poll.

Enum and range members are validated against the API model, and
UpdateAcceleratorAttributes rejects an update that would leave FlowLogsEnabled
true with no destination bucket.

* fix(globalaccelerator): enforce the list caps and HealthCheckPath format from the API model

The scalar ranges were already checked against globalaccelerator/2018-08-08, but the
array-count caps were not. PortRanges, EndpointConfigurations and PortOverrides each
declare max 10, and IpAddresses declares max 2 for the BYOIP case. All four were
unbounded. HealthCheckPath declares max 255 and the pattern
^/[-a-zA-Z0-9@:%_\+.~#?&/=]*$, which was not checked at all.

The new failures reuse InvalidArgumentException and the message shape the existing
scalar validations already use, so they are indistinguishable in kind from those.

* test(globalaccelerator): add the SDK compatibility test

Adds the globalaccelerator SDK module, a TestFixtures client factory and a
GlobalAcceleratorTest that drives accelerator, listener and endpoint group
lifecycles through the AWS SDK v2 client, including the new PortRanges cap.

---------

Co-authored-by: lex00 <artigues.dev@gmail.com>
2026-09-11 16:53:22 -04:00
Matheus Oliveira e3766eac6f feat(kinesis): implement UpdateShardCount API (#3200)
Adds uniform-scaling reshard support via existing splitShard/mergeShards
machinery, with the documented double/half, 10000-shard, and 10-scales-per-24h
limits enforced as LimitExceededException/InvalidArgumentException/ValidationException.
The half-shard-count minimum rounds up for an odd current count, which is
Floci's own call since AWS documents only "below half" with no stated
rounding direction; the separate 10 TPS call-rate limit AWS documents on this
action is not simulated, matching Floci's lack of real-time request
throttling elsewhere. Both are now called out explicitly in the docs and code.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* Fix #3064
2026-09-11 16:25:49 -04:00
Matheus André 8d011cb983 fix(apigateway): implement MOCK integration response selection based on status code (#3327)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-11 12:11:12 -04:00
Kenshin Okinaka e219ea409f feat(ses): support v2 dedicated IP (IP-level) and scaling/warmup APIs (#3420)
Add the remaining SES v2 dedicated-IP operations on top of pool management:
GetDedicatedIps, GetDedicatedIp, PutDedicatedIpInPool,
PutDedicatedIpWarmupAttributes, PutDedicatedIpPoolScalingAttributes, and
PutAccountDedicatedIpWarmupAttributes.

SES has no API to create a dedicated IP (they are leased out-of-band or
auto-provisioned), so Floci models an account with no dedicated IPs:
GetDedicatedIps is empty and any IP-targeted operation returns NotFoundException
'Could not find dedicated IP <ip> under this account.', matching real AWS for an
account with no leased IPs (verified 2026-06-21). PutDedicatedIpPoolScalingAttributes
updates the pool's scaling mode, and PutAccountDedicatedIpWarmupAttributes stores
the account-level flag now reflected by GetAccount.

Add integration and AWS SDK v2 compatibility tests.
2026-09-11 12:01:13 -04:00
Kenshin Okinaka d96516dc70 feat(firehose): apply the Lambda transform to buffered records (#3393)
* feat(firehose): apply the Lambda transform to buffered records

A flushed buffer now goes to the Lambda processor's function as a single
invocation, and what the function returns is what reaches the destination.
Ok delivers the returned data, Dropped leaves no trace, and every other
outcome routes that record to the error output while the rest of the batch
still delivers: ProcessingFailed, a record the function did not return, a
record id returned twice, and an Ok carrying no data.

A function-level error is retried NumberOfRetries more times and then fails
the whole batch as Lambda.FunctionError; a response the function returned
successfully is final however malformed it is, matching what AWS reports for
a response naming no records at all.

The transformation runs ahead of data format conversion, so a stream
configured for both converts what the function returned, and the
"not applied yet" warning the configuration used to log is gone.

* fix(firehose): clamp a NumberOfRetries wider than a long, and heal a stored Enabled

Long.parseLong threw for a NumberOfRetries too wide for a long, which the
catch treated as "not a number" and answered with the default 3. A larger
retry count than one that clamps therefore got fewer attempts: 2147483648
delivered 101 attempts where 999999999999999999999 delivered 4. Reading it
as a BigInteger keeps the clamp meaningful at any magnitude.

A ProcessingConfiguration persisted before Enabled was defaulted never
passes canonicalizeProcessors again, so the describe path now fills it, the
way that path already self-heals partial BufferingHints. Only Enabled: the
parameters AWS defaults include RoleArn, which a read must not inject from
whatever role is current by then.
2026-09-11 11:45:03 -04:00
Niels Kootstra c6e64a0977 fix(mwaa): isolate environments by account and region (#3400)
* fix(mwaa): isolate environments by account and region

* fix(mwaa): migrate legacy environment records safely
2026-09-11 10:25:21 -04:00
Matan Baruch 485b7c5047 feat(rds): accept AWS IAM DB auth users on MySQL (#3395) 2026-09-11 10:10:26 -04:00
Franklin G. Mendoza efcbc4d993 feat(marketplace-metering): emulate AWS Marketplace Metering API (#3344) 2026-09-11 10:06:04 -04:00
Rafael Sierra f9f90cfc98 feat(s3): add object annotations support (#3324)
* feat(s3): add object annotations support

PutObjectAnnotation, GetObjectAnnotation, ListObjectAnnotations, DeleteObjectAnnotation
via the ?annotation subresource, with per-version storage, x-amz-annotation-directive
on CopyObject, s3:ObjectAnnotation:* notifications, and x-amz-object-if-match.

* fix(s3): serialize annotation restore with copy publication and sweep payloads on reset

* fix(s3): lock cross-account copy buckets via resolveBucket and log compat test cleanup
2026-09-11 10:00:16 -04:00
Franklin G. Mendoza 3c080e1ea6 feat(marketplace-reporting): emulate AWS Marketplace Reporting API (#3343) 2026-09-11 09:15:23 -04:00
Vũ Thế Huy 6b17ef2b1c feat(redshift): emulate GetClusterCredentials and GetClusterCredentialsWithIAM (#3273)
* feat(redshift): add RedshiftCredentialBroker for short-lived Db credentials

* refactor(rds-proxy): widen PasswordValidator to a three-value AuthResult

The wire-level password check the PostgreSQL/MySQL proxy handlers take now
returns REJECT / PASSTHROUGH / MASTER_EQUIVALENT instead of a boolean, so a
caller can tell the proxy to open the backend leg as the cluster master for a
client it has vouched for. RdsAuthProxy keeps its own boolean master-password
callback, renamed MasterPasswordCheck to free the PasswordValidator name, and
adapts it at the handler boundary (non-master stays PASSTHROUGH).

* feat(redshift): auth proxy accepts live GetClusterCredentials credentials

passwordValidatorFor now returns AuthResult and consults RedshiftCredentialBroker:
the master pair and any live minted credential resolve to MASTER_EQUIVALENT, a
known broker user with a stale password is REJECTed, everyone else PASSTHROUGH.

* feat(redshift): add default-credential-duration-seconds config

* feat(redshift): implement GetClusterCredentials action

Mints a short-lived DbUser/DbPassword pair via RedshiftCredentialBroker and
returns it as Query-protocol XML. AutoCreate prefixes IAM: on the DbUser,
DbGroups are echoed, DurationSeconds is validated to 900-3600 (default from
the new config key), and an unknown ClusterIdentifier propagates ClusterNotFound.
The two credential actions are registered in AwsQueryController.REDSHIFT_ACTIONS
and the Query dispatch now forwards the Authorization header to the handler.

* feat(redshift): implement GetClusterCredentialsWithIAM action

Derives the DbUser from the caller's IAM identity resolved via the Authorization
header: an IAM user maps to IAM:<name>, an assumed role to IAMR:<role>, and an
unresolvable caller to the IAMR:floci fallback with a WARN so local and CI flows
are not blocked. Any DbUser request parameter is ignored.

* feat(redshift-data): resolve non-master DbUser via GetClusterCredentials

resolveViaDbUser now accepts a DbUser that has a live credential in
RedshiftCredentialBroker, connecting to the container as the cluster master
(the minted DbUser is nominal). An unknown non-master DbUser still fails with
ValidationException.

* test(redshift): end-to-end GetClusterCredentials + Data API non-master DbUser

Docker-gated: mints a credential for a non-master DbUser via GetClusterCredentials
then runs SELECT 1 through the Data API as that DbUser, asserting the result.

* test(compat): SDK coverage for Redshift GetClusterCredentials

Adds getClusterCredentials and getClusterCredentialsWithIAM assertions to the
AWS SDK Redshift compatibility test.

* docs(redshift): document GetClusterCredentials and GetClusterCredentialsWithIAM

Regenerates the redshift.md action table (excluding the DbGroups member-name
switch label), fills the two new descriptions, updates the wire-auth and
redshift-data.md DbUser notes, and bumps the Service Matrix count to 23.

* fix(redshift): reject a wrong master password instead of passing it through

passwordValidatorFor only treated the master pair as MASTER_EQUIVALENT and let
everything else fall to the broker. A request with the master username but a
wrong password is unknown to the broker, so it classified as PASSTHROUGH; the
wire proxy then opened the backend leg as master (isMaster is username-only) and
the client authenticated with the wrong password. Now the master username is
decided on its own password: match to MASTER_EQUIVALENT, mismatch to REJECT.

* fix(redshift): reject proxy logins when the cluster row is gone; strip IAM user path

passwordValidatorFor fell through to the broker when the cluster was absent from
the account partition, classifying an unknown user as PASSTHROUGH; the wire proxy
reads isMaster from its own start-time config, so that still opened the backend
as master for the master username with any password. Return REJECT when there is
no cluster row to validate against.

RedshiftIamDbUserResolver now strips an IAM path prefix from a user ARN
(user/team/alice -> alice), matching how AWS names the DbUser.

* fix(redshift): keep concurrent credentials, revoke on delete, bound the config default

Addresses PR review (greptile):
- RedshiftCredentialBroker now holds every unexpired credential per DbUser instead
  of one slot, so a reissue no longer invalidates a still-live password (matches
  AWS, which keeps each issued credential valid to its own expiry).
- Add revokeCluster(); RedshiftService calls it on deleteCluster and at the start
  of createCluster, so a cluster recreated with the same identifier does not
  inherit master-equivalent access from a stale credential.
- resolveDurationSeconds now holds the YAML default to the same 900-3600 bounds as
  a request value, falling back to 900 with a WARN instead of minting a credential
  that is already expired or over-range.

* fix(redshift): revoke temp credentials on createCluster rollback too

The greptile review asked for revocation on 'relevant rollback paths'. Both
createCluster failure branches that delete the cluster row now also call
credentialBroker.revokeCluster, so a credential issued by a concurrent
GetClusterCredentials while the row briefly existed cannot outlive it.

* fix(redshift): correct GetClusterCredentials AutoCreate prefix

AWS prefixes the returned DbUser with IAM: when AutoCreate is false and
IAMA: when it is true. The handler returned IAM: when true and no prefix
when false, so a client using the returned name could not authenticate
and the value diverged from GetClusterCredentialsWithIAM, which already
issues prefixed identities.

The broker keys on the returned name, so the proxy and Data API now
expect the prefixed DbUser. Tests and the redshift docs are updated to
match.

* test(redshift): give compat GetClusterCredentials tests distinct @Order

Three methods shared @Order(2), leaving their relative order undefined.
Number the two credential tests 3 and 4 and move testDeleteCluster to 5.
2026-09-10 23:58:33 -04:00
TATSUNO “Taz” Yasuhiro d9cc2a09d0 fix(rds): map Aurora MySQL engine versions to the MySQL image tag (#3382)
CreateDBCluster with Engine aurora-mysql and an Aurora version such as
8.0.mysql_aurora.3.08.0 used the version literally as the container
image tag. Docker has no such tag, leading the pull to 404.

Take the MySQL version in front of the Aurora suffix, so that example
runs mysql:8.0. Plain mysql versions still map to their own tag.

The Go compatibility tests for the RDS Data API on aurora-mysql skip
when the cluster cannot be created, so this failure never showed in
CI. They now run with the mapping fixed.
2026-09-10 23:50:55 -04:00
Franklin G. Mendoza 48d2928061 feat(marketplace-deployment): emulate AWS Marketplace Deployment API (#3341) 2026-09-10 23:43:12 -04:00
Kenshin Okinaka debf9fb0dc feat(firehose): validate and persist ProcessingConfiguration (#3375)
* feat(firehose): validate and persist ProcessingConfiguration

A stream configured with a record transformation was accepted with a 200,
the member dropped by ignoreUnknown, and nothing echoed back. It is now
modelled, validated and stored, so a caller sees what it configured. The
transformation itself is not applied yet: records are still delivered
untransformed, and create and update say so in a warning.

The behavior follows what real AWS does, probed in us-west-2:

- A Lambda processor requires a LambdaArn, which must be a well-formed
  function ARN, and BufferSizeInMBs and BufferIntervalInSeconds are
  all-or-nothing.
- Processor types and parameter names are checked against AWS's enums,
  reproducing the order those sets are printed in and the 1-based member
  paths of the constraint messages.
- UpdateDestination replaces the whole block rather than merging it
  member-wise, the opposite of DataFormatConversionConfiguration: an update
  carrying only {"Enabled": false} leaves no processors behind, and an
  update is validated against its own content.
- A stored Lambda processor gains NumberOfRetries 3 and the stream's
  RoleArn, echoed in AWS's own parameter order.

Two checks AWS does not make are deliberately absent: NumberOfRetries is
not range-checked, accepted as 0 or 9 despite the documented 1 to 8, and the
function a LambdaArn names is not required to exist, unlike the Glue table a
conversion schema names.

* docs(firehose): record what AWS does with a null processor list member

Probed: real AWS answers InternalFailure for "Processors": [null] and for
"Parameters": [null], a fault of its own rather than a validation error.
Reproducing that helps nobody, so the entry stays ignored, which leaves the
configuration a caller would have had by omitting it, and the deviation is
written down instead. A test pins the choice so it reads as a decision.

The review also asked for a maximum of 3 on the processor list. Probing found
no such bound: three, four and five processors all pass validation and reach
the role check, so nothing is enforced here.
2026-09-10 23:25:18 -04:00
lex00 cb6b4d8a88 feat(athena): create, update and delete data catalogs (#3381)
Adds CreateDataCatalog, UpdateDataCatalog and DeleteDataCatalog to the Athena
JSON 1.1 handler, backed by a data-catalogs.json store obtained through
StorageFactory. Catalogs accept the four modelled types (LAMBDA, GLUE, HIVE,
FEDERATED) and a FEDERATED catalog reports the ConnectionType carried in its
connection-type parameter.

TagResource and UntagResource are new, and ListTagsForResource now also serves a
datacatalog ARN. Tags live on the record they belong to, so a workgroup keeps
storing its own tags exactly as before.

The built-in AwsDataCatalog keeps the shape it had: it is still listed first and
still resolves as a GLUE catalog, and it is reserved against create, update,
delete and tagging the way the primary workgroup already is.
2026-09-10 23:07:42 -04:00
Franklin G. Mendoza 2d51259120 feat(verifiedpermissions): add full service emulation (#3128)
* feat(verifiedpermissions): add full service emulation

* fix(verifiedpermissions): harden OIDC and schema validation

* test(verifiedpermissions): add service layer coverage

* fix(verifiedpermissions): support native Cedar runtime

* fix(verifiedpermissions): package Cedar native FFI

* fix(verifiedpermissions): register Cedar deserializers for native

* fix(verifiedpermissions): bound JWKS refreshes

* fix(verifiedpermissions): avoid Cedar entity reflection

* fix(verifiedpermissions): register Cedar native reflection

* fix(verifiedpermissions): refresh rotated OIDC keys safely

* fix(verifiedpermissions): retry failed JWKS refreshes

* refactor(verifiedpermissions): isolate Cedar in sidecar

* fix(verifiedpermissions): harden Cedar sidecar runtime

* fix(verifiedpermissions): build cedar sidecar in compatibility CI

* fix(verifiedpermissions): remove stale cedar jni config

* fix(verifiedpermissions): recover cedar sidecar

* fix(verifiedpermissions): bound OIDC document responses

* fix(verifiedpermissions): start cedar sidecar in native sdk CI
2026-09-10 22:25:50 -04:00
Franklin G. Mendoza cbfa034470 feat(identity-center): complete IAM Identity Center emulation (#3331)
* feat(ssoadmin): add region operation

* feat(ssoadmin): attach customer managed policies

* feat(ssoadmin): create applications

* feat(ssoadmin): create application assignments

* feat(ssoadmin): create account instances

* feat(ssoadmin): create ABAC configuration

* feat(ssoadmin): create trusted token issuers

* feat(ssoadmin): delete account assignments

* feat(ssoadmin): delete applications

* feat(ssoadmin): delete application access scopes

* feat(ssoadmin): delete application assignments

* feat(ssoadmin): delete application authentication methods

* feat(ssoadmin): delete application grants

* feat(ssoadmin): delete identity center instances

* feat(ssoadmin): list principal account assignments

* feat(ssoadmin): provision permission sets

* feat(ssoadmin): list provisioned permission sets

* feat(ssoadmin): list accounts for provisioned permission set

* feat(ssoadmin): describe permission set provisioning status

* feat(ssoadmin): list permission set provisioning status

* feat(ssoadmin): describe account assignment deletion status

* feat(ssoadmin): list account assignment creation status

* feat(ssoadmin): list account assignment deletion status

* feat(ssoadmin): delete permission sets

* feat(ssoadmin): detach customer managed policy references

* feat(ssoadmin): list customer managed policy references

* feat(ssoadmin): get inline permission set policies

* feat(ssoadmin): put permission set boundaries

* feat(ssoadmin): get permission set boundaries

* feat(ssoadmin): delete permission set boundaries

* feat(scim): create groups

* feat(scim): create users

* feat(scim): delete groups

* feat(scim): delete users

* feat(scim): get groups

* feat(scim): get users

* feat(scim): list groups

* feat(scim): list users

* feat(scim): get schemas

* feat(scim): list schemas

* feat(scim): list resource types

* feat(scim): add service provider config

* feat(scim): patch groups

* feat(scim): patch users

* feat(scim): put users

* feat(ssoadmin): delete ABAC configuration

* feat(ssoadmin): delete trusted token issuers

* feat(ssoadmin): describe applications

* feat(ssoadmin): describe application assignments

* feat(ssoadmin): describe instances

* feat(ssoadmin): describe ABAC configuration

* feat(ssoadmin): describe regions

* feat(ssoadmin): describe trusted token issuers

* feat(ssoadmin): describe application providers

* feat(ssoadmin): list application assignments

* feat(ssoadmin): list principal application assignments

* feat(ssoadmin): list applications

* feat(ssoadmin): list application providers

* feat(ssoadmin): list regions

* feat(ssoadmin): list trusted token issuers

* feat(ssoadmin): put application access scopes

* feat(ssoadmin): get application access scopes

* feat: support listing application access scopes

* feat(ssoadmin): get application assignment configuration

* feat(ssoadmin): put application assignment configuration

* feat(ssoadmin): get application authentication methods

* feat(ssoadmin): put application authentication methods

* feat(ssoadmin): list application authentication methods

* feat(ssoadmin): get application grants

* feat(ssoadmin): put application grants

* feat(ssoadmin): list application grants

* feat(ssoadmin): get application session configuration

* feat(ssoadmin): put application session configuration

* feat(ssoadmin): list resource tags

* feat(ssoadmin): tag resources

* feat(ssoadmin): untag resources

* feat(ssoadmin): remove regions

* feat(ssoadmin): update applications

* feat(ssoadmin): update instances

* feat(ssoadmin): update ABAC configuration

* feat(ssoadmin): update trusted token issuers

* feat(ssooidc): register clients

* feat(ssooidc): start device authorization

* feat(ssooidc): create public client tokens

* feat(ssooidc): create IAM-authenticated tokens

* feat(ssoportal): list assigned accounts

* feat(ssoportal): list assigned account roles

* feat(ssoportal): issue assigned role credentials

* feat(ssoportal): invalidate portal sessions

* docs(ssoadmin): report complete operation count

* fix(identity-center): repair CI validation

* fix(identity-center): harden auth and native build

* fix(ssooidc): disambiguate RestAssured query parameter

* fix(identity-center): resolve CI compatibility failures

* fix(identity-center): address maintainer review

* fix(ssoadmin): preserve application provider partition

* fix(identity-center): repair Java compatibility tests

* fix(identity-center): trust local TLS in browser flows

* fix(identity-center): register refresh token grant in SDK test
2026-09-10 16:34:41 -04:00
Franklin G. Mendoza 87f2c2d1a8 feat(marketplace-entitlement): emulate AWS Marketplace Entitlement API (#3340) 2026-09-10 15:26:16 -04:00
Franklin G. Mendoza c99ecea0da feat(marketplace-agreement): emulate AWS Marketplace Agreement API (#3339) 2026-09-10 13:05:23 -04:00
Franklin G. Mendoza 50fa334dc5 feat(marketplace-catalog): emulate AWS Marketplace Catalog API (#3338) 2026-09-10 10:37:04 -04:00
Kenshin Okinaka 9a2a89399a feat(firehose): convert JSON records to Parquet via the floci-duck sidecar (#3333)
* feat(firehose): convert JSON records to Parquet via the floci-duck sidecar

Deliver data-format-converting streams for real: each flushed record is
parsed and type-checked in Java against the stream's Glue table schema
(per-record ParseError/MalformedData routing with AWS's probed message
shapes), valid rows are staged as normalized NDJSON and written to the
destination as Parquet by DuckDB's COPY, and failed records go to the
evaluated ErrorOutputPrefix as AWS-shaped NDJSON error lines. Batch-level
failures (missing Glue table, unsupported schema, sidecar errors) route
every record to the error output instead of dropping them. Adds the
floci.services.firehose.staging-bucket setting and replaces the
PR-1-era unconverted-delivery warning.

* fix(firehose): deliver a scheduled flush as the stream's own account

A scheduled flush runs on the flusher thread, where no request context is
active, so the Glue lookup, the staging writes, the destination writes and
the sidecar all resolved the default account instead of the stream's owner.
A stream owned by another account had its Glue table missed and its objects
written to the wrong partition. The delivery now runs under RequestScopes,
which the CUR scheduler already uses for the same reason, so every store the
delivery touches agrees on the owner. The unconverted path gets this too.

Cleanup failures in the compatibility test are logged rather than swallowed,
per the repository rule on tolerated exceptions.

* fix(firehose): cap the staging buffer size hints

rows.size() * 128 overflows an int at about 16.7 million records, so a batch
of many small records failed before writing any of them, and short of that it
asked for a multi-gigabyte array. Both hints are computed as a long and capped
at 8 MiB; the streams grow as needed, so this only affects the first
allocation.

* docs(firehose): state what a failed error-output write actually guarantees

The comment claimed a failure of the error-output write leaves the converted
rows in the staging bucket, but the enclosing finally removes the staged object
however the method exits, and the Parquet bytes are read into memory before
either destination write, so nothing is retained to recover from. What holds is
that nothing is delivered and the flush fails as a whole, which is what it says
now, along with where recovery does live: the source, which a Kinesis-backed
stream has and a DirectPut buffer does not.

The reverse ordering is documented rather than claimed away: the two
destination writes are not atomic, so an error object can land and the Parquet
write then fail, reporting the failed records while the converted ones are
gone.
2026-09-10 10:20:02 -04:00
Franklin G. Mendoza 483dfb4e1c feat(agentcore): expand Bedrock AgentCore control-plane coverage (#3317)
* feat(agentcore): emulate CreateBrowser

* feat(agentcore): emulate GetBrowser

* feat(agentcore): emulate ListBrowsers

* feat(agentcore): emulate DeleteBrowser

* feat(agentcore): emulate CreateBrowserProfile

* feat(agentcore): emulate GetBrowserProfile

* feat(agentcore): emulate ListBrowserProfiles

* feat(agentcore): emulate DeleteBrowserProfile

* feat(agentcore): emulate CreateCodeInterpreter

* feat(agentcore): emulate GetCodeInterpreter

* feat(agentcore): emulate ListCodeInterpreters

* feat(agentcore): emulate DeleteCodeInterpreter

* feat(agentcore): emulate CreateGatewayRule

* feat(agentcore): emulate GetGatewayRule

* feat(agentcore): emulate ListGatewayRules

* feat(agentcore): emulate UpdateGatewayRule

* feat(agentcore): emulate DeleteGatewayRule

* feat(agentcore): emulate CreateApiKeyCredentialProvider

* feat(agentcore): emulate GetApiKeyCredentialProvider

* feat(agentcore): emulate ListApiKeyCredentialProviders

* feat(agentcore): emulate UpdateApiKeyCredentialProvider

* feat(agentcore): emulate DeleteApiKeyCredentialProvider

* feat(agentcore): emulate CreateOauth2CredentialProvider

* feat(agentcore): emulate GetOauth2CredentialProvider

* feat(agentcore): emulate ListOauth2CredentialProviders

* feat(agentcore): emulate UpdateOauth2CredentialProvider

* feat(agentcore): emulate DeleteOauth2CredentialProvider

* feat(agentcore): emulate GetResourcePolicy

* feat(agentcore): emulate PutResourcePolicy

* feat(agentcore): emulate DeleteResourcePolicy

* docs(agentcore): update expanded coverage

* fix(agentcore): align expanded control-plane contracts

* fix(agentcore): address PR review findings

* test(agentcore): cover persistent delete replay
2026-09-10 00:00:51 -05:00
Matheus André 283890dce9 feat(stepfunctions): add SNS Publish service integration (#3316) 2026-09-09 23:49:27 -05:00
Matheus André abfa8e949e fix(iam): report the real default version of AWS-managed policies (#3275)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-09 22:55:17 -05:00
Mario Toffia 460aa0718e feat(cloudwatch): provision AWS::CloudWatch::Dashboard (#3231)
* feat(cloudwatch): provision AWS::CloudWatch::Dashboard

The dashboard name is the physical id, generated when the template gives none
and kept across updates. An update with the same name puts the body again and
drives the tags to the template's set, since PutDashboard leaves an existing
dashboard's tags alone. A changed name creates the new dashboard and leaves
the displaced one to the ReplacementCleanup record, which deletes it once the
update commits or restores it on rollback. The body may be written as a JSON
object in the template and is stored as the string the API takes.

The CloudWatch docs now list the dashboard and tag actions the handlers
already serve.

* fix(cloudwatch): roll back in-place dashboard updates and replace a dashboard whose explicit name is dropped

An in-place update keeps the body and tags it replaces on the resource, or
the fact that the dashboard did not exist, and a failed stack update puts
them back in full. The name mode is recorded as the Logs provisioner does, so
a template that drops an explicit DashboardName gets a generated name and a
replacement, as on AWS, while an unnamed dashboard keeps its generated name.
The Tags list is checked against the schema's cap of 50 on every provision,
since the tag operations an update reconciles through do not enforce it. The
integration test reads stack events with XmlParser.

* fix(cloudwatch): keep the dashboard rollback snapshot until the restore succeeds

A restore that throws left no snapshot behind, so the next rollback attempt
reported success without restoring anything. The snapshot is now spent only
after the body and tags are back.

* fix(cloudwatch): unwind a dashboard update that failed after it changed the body

An in-place update puts the body and then reconciles the tags. When the tag
calls failed, the exception left the dashboard carrying the new body while
CloudFormationService put the resource the stack held before the attempt back
in its place. That object never carried the snapshot taken by the attempt, so
the walker marked it restored and skipped rollbackUpdate: the stack reported a
completed rollback over a dashboard that still had the update's body, or a half
reconciled set of tags.

The mutating calls now unwind themselves through rollbackUpdate, the way
IotDomainConfigurationCfnProvisioner unwinds a replacement, and report the
resource restored. An unwind that cannot put the body back keeps the snapshot
and records the failure on the resource, so the stack ends in
UPDATE_ROLLBACK_FAILED rather than claiming the prior dashboard is intact, and
the original failure is still what the stack reports.

Tests: anInPlaceUpdateThatFailedOnItsTagsPutsTheBodyBack,
anUnwoundInPlaceUpdateIsMarkedRestored,
anUnwindThatCannotRestoreIsReportedAsARollbackFailure.

* fix(cloudwatch): record a dashboard unwind failure before joining it to the update failure

The unwind repeats the tag call the update just made, so a service that
keeps failing hands the unwind the very exception that interrupted the
update. Throwable.addSuppressed rejects a throwable suppressed under
itself, and that IllegalArgumentException escaped the unwind before the
rollback failure was recorded: the dispatcher reported "Self-suppression
not permitted" as the resource failure, no failure attribute reached the
stored resource, and the stack ended UPDATE_ROLLBACK_COMPLETE over a
dashboard whose tags were never put back.

The failure attribute is now written first and the two exceptions are
joined only when they differ, as PipesCfnProvisioner does. Two stack-level
tests drive the whole path through CloudFormationService with a spied
CloudWatchDashboardsService, the way CloudFormationPipesCleanupIntegrationTest
does: a one-off tag failure ends in UPDATE_ROLLBACK_COMPLETE with the prior
body and tags live, a persistent one in UPDATE_ROLLBACK_FAILED naming the
dashboard and carrying the unwind's reason.

Tests: anUnwindThatFailsWithTheUpdatesOwnExceptionIsStillRecorded,
anUpdateThatFailedOnItsTagsPutsTheDashboardBackAndTheStackRollsBackCleanly,
aFailedRestoreLeavesTheStackInUpdateRollbackFailedNamingTheDashboard.
2026-09-09 22:37:45 -05:00
Matan Baruch 6eca8540a8 feat(aps): implement AMP rule groups namespaces (#3330)
* feat(aps): implement AMP rule groups namespaces

Closes #3329

* fix(aps): validate rule groups namespace names and tag ARN scope
2026-09-09 22:22:26 -05:00
Matheus André 2d5a8f705b fix(amazonmq): add configuration for AMQP and console host port ranges (#3315)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-09 22:23:07 -04:00
Matheus André 8180d4b3b8 feat(acm): enhance email validation to report approval mailboxes and omit DNS records (#3290) 2026-09-09 22:03:21 -04:00
Allen Sanborn cf1aabce39 feat(ec2): back each VPC with a real Docker network in RFC 1918 space (#3272)
* feat(ec2): back each VPC with a real Docker network in RFC 1918 space

An instance's private IP was a plausible-looking number nothing could
connect to. Every VPC now gets its own Docker network, created lazily on
the first launch into it, with the VPC CIDR as the network's IPAM pool
and each subnet allocating static addresses from its own slice. The
address Floci reports is one the container actually holds, and instances
in different VPCs sit on different bridges.

One network per VPC, not per subnet: subnets inside a VPC route to each
other in AWS, so a network per subnet would manufacture a partition AWS
does not have and break the two-tier app/database topologies this corpus
is full of.

The declared CIDR is used verbatim wherever it can be. It cannot be when
it is absent, malformed, outside RFC 1918, or already claimed on the
Docker daemon, which includes another Floci VPC: two VPCs may legally
declare the same CIDR in AWS but one daemon cannot route two identical
ranges. Only then is an equivalent block drawn from the configured
fallback pool, and the substitution is logged at WARN. A reported private
IP that does not mean what the caller declared is either true or it is in
the log.

Leases are given back on every exit: a launch that never attaches, a
launch that fails, and terminate. Detach precedes release, because Docker
holds the address while the endpoint stands and would refuse the next
launch handed the same one. Startup reconciles this emulator's own
orphaned networks first (scoped by API port, so instances sharing a
daemon never touch each other's), then re-declares the plan from
persisted VPCs and subnets and re-reserves the addresses restored
instances still hold.

Between-VPC isolation is the Docker daemon's, not Floci's, and OrbStack
does not enforce it. On such a host the VPC boundary is an addressing
boundary only. docs/services/ec2.md says so.

Off with FLOCI_SERVICES_EC2_VPC_NETWORKS_ENABLED=false, and off whenever
ec2 mock is on.

* fix(ec2): do not adopt a leftover VPC network that routes another range

materialise() treated any network under the VPC's own name as its own: a
successful inspect set created=true and returned. A network left by a
previous run that declared a different CIDR was therefore adopted, after
which addresses were handed out of vpc.effective while the bridge routed
something else entirely.

Compare the leftover's IPAM subnet to vpc.effective. A match is adopted as
before. A mismatch is removed and recreated on the planned range rather
than re-planned onto the leftover's subnet: by the time materialise runs,
addresses have already been allocated from vpc.effective, and after a
restart some are leases held by live containers, so the plan cannot move
under them. The network name carries this emulator's own port and region,
so recreating it cannot destroy a user's network. If the removal fails the
instance stays on the shared bridge, which is a documented degradation,
instead of holding an address nothing routes.

Also make small blocks work or refuse out loud. FIRST_HOST_OFFSET was a
flat 10, so a /29 (eight addresses) and a /30 (four) allocated nothing at
all and said nothing about it, and fallback-prefix-length had no upper
bound to stop a /30 being configured. The offset now scales down to 2 for
blocks that cannot spare ten addresses, a block with no room for a host is
refused at plan time with a WARN, and the fallback prefix is clamped into
the range that can serve hosts.

* fix(ec2): keep the IMDS source address current across start and restore

Ec2MetadataServer resolves an instance from the source address of the
request, and a container's default route is the bridge, so a VPC-attached
instance's metadata requests arrive from its bridge address rather than
from the VPC address Floci reports. launch() registered both. start() and
restoreMetadataRegistration() registered only the address
getContainerBridgeIp returns, which for a VPC-attached container is the
VPC address: neither refreshed imdsSourceIp nor registered the bridge.

Docker hands out a fresh bridge address when a stopped container starts
again, and an emulator restart rebuilds the registration map empty, so
after either the instance's IMDS requests arrived from an address nothing
knew about, while the address from the previous run stayed registered.

Both paths now unregister the stale source address and register the
current one. A bridge-only instance is unaffected: its reported address
and its bridge address are the same, so there is no second registration.

* fix(ec2): keep the IMDS source registration when inspect fails

bridgeNetworkIp swallowed every inspect failure and returned null, the same
answer it gives for a container that genuinely has no bridge address.
refreshImdsSourceRegistration acts on that null by unregistering the instance's
recorded IMDS source address, so one transient Docker hiccup permanently dropped
a healthy instance's registration and put nothing in its place: its metadata
requests stopped resolving until some later start or restore happened to
succeed.

Split the two answers apart. bridgeNetworkIp now lets the exception propagate,
so null means only "no bridge address"; refreshImdsSourceRegistration catches it
and returns early, leaving the existing registration exactly as it was.

* docs(ec2): drop the em dashes this branch added

AGENTS.md forbids em dashes in all content. The enforcing check runs with
--diff-filter=A, so it only scans files a PR adds and stayed green on these, but a
check that cannot see a violation is not a licence for it. Six of them are in lines
this branch adds: four in docs/services/ec2.md, one in an Ec2ContainerManager javadoc,
one in an Instance javadoc.

Replaced with colons and commas. Wording is otherwise unchanged, and the em dashes
already present in these files are left alone: they predate this branch, and
rewriting them here would bury the actual change in unrelated churn.
2026-09-09 18:12:40 -05:00
Olamide Kosile b988dc5d1a feat(athena): support ListTagsForResource for workgroups (#3242)
* feat(athena): support ListTagsForResource for workgroups

Fixes #2791. terraform-provider-aws's read/refresh for aws_athena_workgroup
calls ListTagsForResource unconditionally, even when no tags are set,
and floci's Athena handler had no support for the action:

  Error: listing tags for Athena WorkGroup ...: InvalidAction: Action
  ListTagsForResource is not supported

Parses the workgroup name out of the ResourceARN (using the existing
AwsArnUtils helper) and returns the tags already captured on
CreateWorkGroup. The primary workgroup always answers with an empty
list, matching a live account, since CreateWorkGroup already rejects
"primary" and it can never carry real tags. An ARN for an unsupported
resource type, or naming a workgroup that doesn't exist, faults with
InvalidRequestException like the rest of this handler's not-found cases.

* docs(athena): sync the supported-actions table for ListTagsForResource

* fix(athena): reject ListTagsForResource ARNs naming a different service

pgermosen (review): listTagsForResource only checked that the ARN's
resource path started with workgroup/, never the service, so an ARN
naming a completely different service with a coincidentally matching
region and workgroup name resolved instead of being rejected the way
real AWS rejects a ResourceARN naming the wrong service.

Adds the explicit arn.service() == "athena" check, plus a RestAssured
test proving a workgroup-shaped ARN under a different service is
rejected even when a same-named workgroup genuinely exists. Verified by
disabling the check and confirming the new test fails with the exact
expected 400-vs-200 mismatch before restoring it.

Also adds an SDK-client test (AthenaTest, compat suite) round-tripping
ListTagsForResource through the real AthenaClient, per review request to
validate request/response shapes the way other management API PRs do.
2026-09-09 16:27:02 -04:00