Inject EksService and add provision + delete handling for AWS::EKS::Cluster and
AWS::EKS::Nodegroup. Clusters are created via the EKS createCluster API
(RoleArn, ResourcesVpcConfig, version); node groups via createNodegroup under
their cluster. Ref returns the resource name; Fn::GetAtt exposes Arn (and the
cluster Endpoint). Stack deletion removes the cluster/node group.
ScheduleInvoker routed solely by substring-matching the target ARN, so a
universal target (arn:aws:scheduler:::aws-sdk:sns:publish) matched the
":sns:" branch and passed the universal-target ARN itself to SnsService as
the topic, failing at fire time with "Topic does not exist". The real
TopicArn carried in the target Input was never read.
Detect the aws-sdk:<service>:<action> form before the ARN routing and
dispatch sns:publish / sqs:sendMessage using the parameters parsed from
Input. Also add Target.SqsParameters so templated FIFO SQS targets honor
MessageGroupId instead of failing with "The request must contain the
parameter MessageGroupId".
Closes#1265
Inject RdsService and add provision + delete handling for AWS::RDS::DBInstance,
DBCluster, DBSubnetGroup, DBParameterGroup and DBClusterParameterGroup.
DBInstance/DBCluster start real RDS containers (same path as the direct API).
Ref returns the resource identifier; Fn::GetAtt exposes Endpoint.Address,
Endpoint.Port and the resource ARN (plus ReadEndpoint.Address for clusters).
Stack deletion removes each resource so create/delete is symmetric.
Add provision + delete handling for AWS::EC2::Instance: CreateStack runs a real
instance via Ec2Service.runInstances (ImageId, InstanceType, KeyName,
SecurityGroupIds, SubnetId, UserData, IAM instance profile, Tags) and stack
deletion terminates it. Ref returns the instance id; Fn::GetAtt exposes
AvailabilityZone, PrivateIp/PublicIp and PrivateDnsName. Docker-free integration
test isolated to ap-southeast-2 to avoid shared in-memory EC2 state.
Implements the Fn::GetAZs and Fn::Cidr (IPv4) intrinsic functions in
CloudFormationTemplateEngine. Fn::GetAZs returns the region's availability zones;
Fn::Cidr carves a CIDR block into equally sized subnets. A resolveList helper
lets Fn::Select compose with these list-returning intrinsics. Adds an end-to-end
test that drives subnet provisioning through Fn::Select(Fn::GetAZs)/Fn::Cidr.
Ec2Service kept all VPC/subnet/security-group/instance state in plain in-memory
maps, so in persistent storage mode it was lost on restart while CloudFormation
reloaded its stacks and exports. The persisted exports/stack then referenced EC2
ids that no longer existed: describe-subnets returned nothing and ELBv2 failed
with SubnetNotFound.
Migrate the in-memory maps to StorageBackend via StorageFactory (mirroring
RdsService) so all EC2 networking and instance metadata persists and reloads on
startup. In-place mutations (security group rules, routes, gateway attachments,
EIP associations, tags, instance state) put the entity back so changes persist
immediately. Default-resource seeding is skipped when a region already has
persisted resources to avoid duplicates after reload. Adds an ec2 per-service
storage override for parity with rds.
Closes#1297
* feat(docdb): add DocDbCluster model
* feat(docdb): add DocDbInstance model
* feat(docdb): add DocDbContainerHandler
* feat(docdb): add container manager and service config
* feat(docdb): add DocDbService with cluster and instance lifecycle
* feat(docdb): add DocDbQueryHandler
* feat(docdb): Register the service in ResolvedServiceCatalog and Dispatch in AwsQueryController
* test(docdb): add integration test for cluster and instance lifecycle
* fix(docdb): probe MongoDB readiness with a TCP connect instead of a Gremlin HTTP request
* fix(docdb): stop persisting the cluster master password at rest
* fix(docdb): return a generic AWS error envelope for unexpected failures
* feat(docdb): add mock mode to return responses without starting a container
* feat(ui): serve a landing page and launch the floci-ui console on demand
A browser hitting the Floci endpoint (GET / with Accept: text/html) now gets a
small embedded landing page; SDK/CLI traffic falls through to S3 ListBuckets
unchanged. The 'Open Floci UI' button hits /_floci/ui, which lazily starts the
floci-ui sidecar container, injects FLOCI_ENDPOINT so its API can reach Floci,
and serves an interstitial that polls /_floci/ui/status and redirects to the UI
once ready.
The sidecar is a single instance on one configured host port
(floci.services.ui.port, default 8080) and is adopted if already running. A
missing or unavailable image is reported as a friendly message instead of a 500.
Embedded ui/*.html is registered in quarkus.native.resources.includes so it is
present in the native image.
* feat(ui): branded landing dashboard, port 4500, reachable endpoint
Reskin the landing page to floci.io branding and surface live data from
/_floci/* (version, ready state, services grid). Publish the UI sidecar on a
fixed 4500 host+container port. Inject a self-discovered FLOCI_ENDPOINT via
DockerHostResolver so the UI reaches Floci over the Docker network instead of
hardcoded host.docker.internal logic; add FlociUiManagerTest.
* fix(s3): keep ListBuckets Content-Type as application/xml for non-HTML callers
The landing-page content negotiation listed text/html first in @Produces and
returned the ListBuckets XML without an explicit media type, so RESTEasy
negotiated Accept: */* (SDK/CLI default) to text/html and stamped that on the
response. Put application/xml first and pin the XML response type so non-browser
callers always receive application/xml; browser (Accept: text/html) callers
still get the landing page.
AWS::EC2::VPC and AWS::EC2::Subnet (and related networking resources) had no
provisioner case, so they fell through to the stub branch: CloudFormation
reported CREATE_COMPLETE and exported a fake "logicalId-<random>" physical id,
but the subnet was never created in EC2. ec2 describe-subnets did not return it
and elbv2 create-load-balancer failed with "The subnet ID '...' does not exist".
Inject Ec2Service into CloudFormationResourceProvisioner and add cases for VPC,
Subnet, SecurityGroup, InternetGateway, RouteTable, SubnetRouteTableAssociation,
Route, NatGateway and EIP. Each delegates to the existing Ec2Service create
methods and sets the physical id to the real vpc-/subnet-/... id so Ref/exports
resolve to resources EC2 and ELBv2 can use. Topological ordering already
guarantees parents are provisioned before children.
Adds a CloudFormation+EC2+ELBv2 integration test plus AWS CLI and CDK
compatibility coverage.
Closes#1297
The handler emitted a map entry with an empty <value> for every queried
identity, including ones that were never verified. Real AWS returns an
empty NotificationAttributes map for an unknown identity and drops it
from a mixed query, never an entry with missing fields (verified against
real AWS SES on 2026-06-13). The fabricated empty entry also violated the
response contract, since the entry's value lacked the required
ForwardingEnabled field. The handler now skips identities the service
doesn't know about.
* fix(sts): persist session secret key so RDS/ElastiCache IAM tokens validate
STS session credentials (ASIA... keys) issued by AssumeRole, GetSessionToken,
AssumeRoleWithWebIdentity, AssumeRoleWithSAML and GetFederationToken were
rejected by the RDS and ElastiCache SigV4 validators because the temporary
secret access key was never stored.
Root cause:
- StsQueryHandler generated a random secretKey and returned it to the caller
but only passed accessKeyId + roleArn to registerSession — the secret was
discarded.
- SessionCredential had no secretAccessKey field.
- IamService.findSecretKey only checked the accessKeys store (AKIA... keys);
the sessions store was never consulted.
- RdsSigV4Validator fell back to orElse(accessKeyId), using the key ID itself
as the signing secret, so every HMAC comparison failed with 28P01.
Fix:
1. Add secretAccessKey field to SessionCredential.
2. Add registerSession overload that accepts the secret and stores it.
3. Update all five STS handlers to call the new overload.
4. Make findSecretKey check sessions as a fallback after accessKeys.
5. Add IamServiceTestHelper.iamServiceWithSessionCredential helper and two
new RdsSigV4ValidatorTest cases covering the ASIA key path.
The same findSecretKey call is used by the ElastiCache SigV4Validator, so
both services benefit from this fix.
* fix: avoid IAM enforcement crash for identity sessions
* feat(cloudformation): provision Lambda-backed custom resources and layer versions
Custom::* and AWS::CloudFormation::CustomResource resources were stubbed in the
provisioner, so the ServiceToken Lambda was never invoked. Stacks reported
CREATE_COMPLETE while the custom resource's work silently never ran (e.g. CDK
BucketDeployment left the destination bucket empty).
Provision custom resources by invoking the ServiceToken Lambda synchronously
and capturing the response it PUTs to ResponseURL:
- CfnResponseController (PUT /cfn-response/{token}) receives the callback
- CustomResourceResponseStore correlates it to the waiting provisioner
- ContainerReachableEndpoint (extracted from ContainerLauncher) gives the
ResponseURL an address reachable from inside the Lambda container
ResourceProperties scalars are stringified to match CloudFormation (true ->
"true"); Data is exposed via Fn::GetAtt; ServiceToken + properties are stored so
teardown can re-invoke the handler with RequestType=Delete.
Also provision AWS::Lambda::LayerVersion (previously stubbed) so layer ARNs
resolve and layer content is copied into /opt — required for the common
BucketDeployment case, whose handler shells out to a bundled AwsCliLayer.
Covers the single-Lambda synchronous custom-resource pattern; the async CDK
Provider framework (onEvent/isComplete polling) is not emulated.
Closes#1145
* test: pass ecsService/elbV2Service args to provisioner constructor
The merge with main added two constructor params; update the
custom-resource test's direct instantiation to match.
* fix(cloudformation): match AWS custom-resource event shape
Keep ServiceToken inside ResourceProperties (it is also surfaced at the
top level) to match real CloudFormation events, verified against the moto
reference (cloudformation/custom_model.py). Previously it was stripped.
Also include OldResourceProperties on Update requests, which CloudFormation
marks required so handlers can diff against the previous properties. The
prior values are read from the existing stash before it is overwritten.
* test: pass stepFunctionsService arg to provisioner constructor
origin/main added a StepFunctionsService parameter to the
CloudFormationResourceProvisioner constructor; update the custom-resource
test to match after merging main.
---------
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
GlueService.getPartitions returned partitions in storage-scan order, which is
not stable across runs because partition keys embed the table name. Sort by
partition values so GetPartitions is deterministic, matching the existing
sorted-list convention in GlueService and the moto reference, which preserves a
stable partition order.
De-flakes the sdk-test-awscli "Glue catalog: table and partition lifecycle"
compatibility test, whose assertions assume a stable partition order.
* fix(appconfig): stop AppConfig route hijacking S3 bucket named configuration
A path-style S3 request to a bucket named exactly "configuration" (e.g.
GET /configuration?list-type=2) matched AppConfigData's literal
GET /configuration route ahead of S3's /{bucket} template, so routine
list/read calls returned HTTP 500 (NullPointerException on a null
configuration_token).
Move AppConfigData GetLatestConfiguration to an internal path and add a
@PreMatching AppConfigConfigurationRouteFilter that rewrites genuine
requests (those carrying a configuration_token) onto it. Requests without
a token keep the bare /configuration path and fall through to S3's
/{bucket} route. This mirrors the existing SqsQueueUrlRouterFilter and
LambdaUrlRoutingFilter path-rewrite pattern and avoids one controller
depending on another.
Closes#1294
* fix(appconfig): drop unreachable configuration_token guard
The route is bound to the internal path and the @PreMatching filter only
rewrites onto it when a configuration_token is present, so the guard could
never fire. Remove it and the now-unused AwsException import.
* fix(ecs): add network mode and resources validation for fargate task definitions
* fix(ecs): add validation for ECS with fargate for task definition
* fix(ecs): add exact error messages and compatibilities default to EC2 when requiresCompatibilities not provided
Add the wafv2 (AWSWAF_20190729) JSON 1.1 service: Web ACLs, IP sets, regex
pattern sets, and rule groups, plus resource association, logging and permission
policies, and tagging. Uses LockToken optimistic concurrency and isolates the
CLOUDFRONT and REGIONAL scopes.
Covered by an in-repo RestAssured integration test and an AWS SDK v2
compatibility test.
Add the elasticmapreduce (ElasticMapReduce) JSON 1.1 service: cluster lifecycle
with a simulated state machine, job-flow steps, instance groups and fleets,
security configurations, and tags. Honours the ActionOnFailure legacy alias and
EMR's distinct error shapes.
Operations: RunJobFlow, DescribeCluster, ListClusters, TerminateJobFlows,
SetTerminationProtection, SetVisibleToAllUsers, SetKeepJobFlowAliveWhenNoSteps,
SetUnhealthyNodeReplacement, ModifyCluster, AddJobFlowSteps, DescribeStep,
ListSteps, CancelSteps, AddInstanceGroups, ListInstanceGroups, AddInstanceFleet,
ListInstanceFleets, ListInstances, CreateSecurityConfiguration,
DescribeSecurityConfiguration, DeleteSecurityConfiguration,
ListSecurityConfigurations, AddTags, RemoveTags.
EmrService holds a static SecureRandom, so it is registered under
quarkus.native.resources additional-build-args --initialize-at-run-time to keep
the GraalVM native build working.
Covered by an in-repo RestAssured integration test and an AWS SDK v2
compatibility test.
InitiateAuth with USER_SRP_AUTH returned a PASSWORD_VERIFIER challenge
whose ChallengeParameters carried USER_ID_FOR_SRP but not USERNAME. Real
AWS Cognito returns both, and the .NET Amazon.Extensions.CognitoAuthentication
SRP client reads ChallengeParameters["USERNAME"], so it threw
KeyNotFoundException against floci.
Add USERNAME alongside USER_ID_FOR_SRP and assert it in the SRP flow test.
Closes#1305
GetEmailIdentity dropped the entire MailFromAttributes block for an
identity with no MAIL FROM domain configured, so an SDK caller saw
mailFromAttributes() == null on the emulator but non-null on real AWS.
AWS keeps the block carrying BehaviorOnMxFailure and omits only the
inner MailFromDomain / MailFromDomainStatus fields.
Clearing the MAIL FROM domain also resets BehaviorOnMxFailure to
UseDefaultValue, matching AWS, so a cleared identity is indistinguishable
from one that was never configured.
RunInstances 500d on the native image because ec2/image-catalog.yaml was not
embedded: the app-local resource-config.json pattern is not reliably honored by
Quarkus' native build. Register the catalog via quarkus.native.resources.includes,
mirroring the pricing-snapshots entry.
Also load the catalog lazily instead of in the bean constructor so a missing or
unparseable resource no longer fails EC2 bean creation, which keeps mock mode
(which never reads the catalog) working.
Refs #1296
* fix(ses): persist inline options on v2 CreateConfigurationSet
CreateConfigurationSet parsed only ConfigurationSetName and Tags,
silently dropping the SendingOptions and SuppressionOptions blocks of
the request. GetConfigurationSet then fabricated a default
SendingOptions ("SendingEnabled": true via the null-means-enabled
effective getter), so a set created with SendingEnabled: false read
back as true, and SuppressedReasons vanished entirely. Real AWS echoes
both blocks verbatim (verified live 2026-06-12).
The controller now parses both blocks onto the ConfigurationSet before
the single store write, with the same structural validation as the
dedicated PUT endpoints (non-object blocks, non-boolean SendingEnabled
and non-string reasons are rejected with BadRequestException). The
service validates suppression reason values at create alongside the
existing tag validation, so an invalid reason rejects the request
without leaving a half-created set behind. The SuppressedReasons
structural parsing is shared with PutConfigurationSetSuppressionOptions
via a common helper.
The remaining five inline option groups (Tracking / Delivery /
Reputation / Vdm / Archiving) have no model fields or endpoints yet
and stay out of scope.
* fix(ses): match AWS error layers on v2 CreateConfigurationSet options
Live verification against real AWS SES V2 (2026-06-13) showed the
endpoint validates inline options in two layers that the previous
commit conflated into BadRequestException:
- Type violations fail in the deserialization layer with
SerializationException: non-object option blocks ("Expected null"),
a non-array SuppressedReasons ("Expected list or null"), and
non-string reason elements / non-boolean scalars for SendingEnabled
(token-style messages such as "NUMBER_VALUE can not be converted to
a String").
- Value violations fail in the validation layer with
BadRequestException using the constraint-style message ("1 validation
error detected: ..."), which differs from the natural-language
sentence the PUT endpoint uses for the same check.
SendingEnabled itself follows AWS deserialization semantics: a missing
member inside a present SendingOptions block defaults to false, any
string coerces to true, and an explicit null fails with a null-message
SerializationException. SuppressionOptions without SuppressedReasons
reproduces the 500 InternalFailure AWS itself returns, so code
developed against Floci fails the same way it would in production.
* fix(ses): align null suppressed-reason handling with AWS on v2 create
Live verification (2026-06-13) shows AWS lets a null element pass the
SuppressedReasons deserialization ("Expected list or null") and rejects
it in value validation with the same natural-language sentence the PUT
endpoint uses, not the constraint-style message reported for invalid
non-null values. CreateConfigurationSet now branches accordingly, the
parsing helper's javadoc documents the intentional null pass-through,
and the FALSE_VALUE token message is covered by a test now that it is
verified rather than inferred.
* fix(ses): make null suppressed-reason branch explicit on v2 create
The null check relied on validateConfigSetSuppressionReason always
throwing, which would silently fall through to the constraint-style
message if that method ever changed. The branch now throws directly,
with the sentence shared through a message helper. Also locks the
verbatim AWS "Expected null" response for non-object option blocks
into a test so the surprising message does not get "fixed" later.
GetWorkGroup previously returned a hardcoded default response for any
workgroup name, ignoring workgroups created via CreateWorkGroup and
never failing for non-existent ones.
- Return stored Name, State, Description, CreationTime and
Configuration for created workgroups, scoped by region
- Throw InvalidRequestException (400) when the workgroup is not found,
matching the AWS error shape and message
- Keep the default view for the primary workgroup
- Make DeleteWorkGroup actually remove the entry from the store so a
deleted workgroup is no longer returned and its name can be reused
- Document DeleteWorkGroup in the supported actions table
Closes#1128
* fix(msk): populate currentBrokerSoftwareInfo in cluster describe response
* fix(msk): map provisioned.kafkaVersion in CreateClusterV2
Addresses review feedback: V2 create requests carry kafkaVersion under
provisioned, not at the top level, so it was always falling back to the
default. Adds integration test coverage for the V1 path, V2 with
provisioned.kafkaVersion, and V2 default fallback.
* fix(msk): update RedpandaManagerTest for MskCluster 3-arg constructor
* chore(fixtures): capture AWS Cognito auth flow fixtures for contract tests
Captures 7 wire-format fixtures against wirebit stg pool for use as ground truth
in floci compatibility tests. Includes capture script with PII sanitization and
best-effort user cleanup.
Empirical findings vs spec:
- No client-side rate-limit observed on back-to-back ResendConfirmationCode
- PreventUserExistenceErrors=LEGACY in wirebit prod/stg (older pools)
- Email Destination masking is aggressive: f***@e***
* feat(cognito): add verification code store, message dispatcher and SNS inspection
Introduces the foundation for full Cognito auth flow emulation:
- VerificationCodeService: 6-digit codes hashed with per-code salt, persisted
via StorageFactory with TTL + 30s rate-limit + 5-attempt invalidation.
- VerificationCode model: serializable to disk for filesystem storage mode.
- CognitoMessageDispatcher: renders VerificationMessageTemplate ({####}
placeholder + failsafe), dispatches via SesService (email) or SnsService
(SMS) honoring DeliveryMediums.
- SnsService: now persists every phone publish() as a SentSms record and
exposes getSentMessages()/clearSentMessages().
- SnsInspectionController: GET/DELETE /_aws/sns mirroring SesInspectionController.
- FixtureLoader + 7 AWS Cognito fixtures captured against wirebit-stg pool
(sign-up, confirm-signup error, resend, forgot-password unknown-user, SRP
unknown-user). Relocated from compatibility-tests/ to src/test/resources/
so JUnit can load them via classpath.
Not yet wired to any flow — that's PR #2-5 in a stacked series.
Tests: 22 new (9 VerificationCodeService + 6 dispatcher + 4 SNS inspection +
3 FixtureLoader). Full suite 4336 passing (was 4314), ElastiCacheIntegrationTest
excluded due to local port-6379 collision.
* feat(ses): SesInspectionController supports ?email= filter
Symmetric to SnsInspectionController.?phone= (added in the verification
code store commit). Lets test helpers retrieve the latest email sent to
a specific recipient without filtering client-side over the full message
list.
GET /_aws/ses?email=user@example.com → only messages where the address
is in ToAddresses.
* fix(cognito): align verification dispatcher with AWS and current SES API
Adapt the adopted verification-code foundation to current main and AWS:
- update CognitoMessageDispatcher to the 12-arg SesService.sendEmail signature
- source the MFA SMS message from the user pool's top-level SmsAuthenticationMessage
(it is not part of VerificationMessageTemplate, which only holds SmsMessage)
- match AWS's out-of-the-box default verification message text
- document the 30s resend window and 5-attempt cap as emulation heuristics (not
AWS-published constants) and add TODOs for DefaultEmailOption, medium preference,
and per-purpose TTL that the auth-flow wiring must honour
Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>
* refactor(cognito): drop dead code flagged by static analysis
- remove no-op ctorRequest local in scripts/aws-fixtures-capture.mjs
- drop the unused purpose parameter from emailTemplateKey() and its call site
Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>
* chore(cognito): remove the one-off AWS fixture-capture dev script
The captured aws-cognito/*.json fixtures remain (FixtureLoader uses those); the Node capture tool is not needed in the repo.
---------
Co-authored-by: Ricardo Medina <34877263+ricardomedina98@users.noreply.github.com>
* feat(athena): support DeleteWorkGroup action
* feat(athena): validate WorkGroup name and block deletion of primary workgroup
* fix: validate WorkGroup name pattern in DeleteWorkGroup per AWS constraints
---------
Co-authored-by: mansiverma897993 <vmansi756@gmaail.com>