* 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>
* fix(msk): poll correct Redpanda admin readiness endpoint
* test(msk): pin RedpandaManager.isReady() to the /v1/status/ready admin path
isReady() resolves an admin URL and polls it for a 200 to decide whether
the Redpanda container is ready, but nothing asserted which path it hits.
Add RedpandaManagerTest.isReadyPollsTheCorrectAdminReadinessPathInNativeMode:
a local HTTP server stands in for Redpanda's admin API (200 on
/v1/status/ready, 404 on /ready — the previously-polled path that always
404s), the Docker container-inspect chain is mocked to resolve the admin
port binding to that server, and isReady() is asserted to report ready.
Reverting ADMIN_READY_PATH to /ready makes the assertion fail, pinning
the fix as a regression guard.
* fix(lambda): normalize backslash ZIP path separators on extraction
PowerShell's Compress-Archive writes ZIP entry names with '\' separators,
violating the ZIP spec (APPNOTE.TXT 4.4.17 mandates '/'). On Linux '\' is a
literal filename character, so a .NET/Blazor publish archive extracted to a
single flat file named "wwwroot\app.css" instead of nested directories,
breaking static-file lookups under /var/task.
Normalize '\' -> '/' before any path handling so such archives extract to the
correct nested paths, matching how real AWS Lambda unpacks them. A trailing
separator is also treated as a directory entry, since the backslash form would
otherwise slip past ZipEntry.isDirectory(). The path-traversal guard now runs
on the normalized name, so "..\..\evil" is still rejected.
Closes#1198
* fix(lambda): warn on backslash ZIP separators instead of normalizing
Real AWS Lambda does NOT normalize '\' to '/' in ZIP entry names — a
PowerShell Compress-Archive entry extracts as a literal-named file. The
previous normalization made Floci more forgiving than AWS, letting broken
packages pass locally and fail on deploy.
Replace the normalization with a clear warning that tells the developer
why the backslash entry is problematic and how to repackage correctly
(tar, pwsh, or dotnet lambda CLI). The traversal guard and containment
check stay as-is.
CloudMapService held a static final SecureRandom, which GraalVM evaluates
at build time and bakes into the image heap with a cached seed, failing the
native build (DisallowedImageHeapObjects). Make it a non-static instance field
on the @ApplicationScoped bean so it is created at runtime instead, matching
how other services (msk, opensearch, rds) construct SecureRandom locally.
Also remove the stray src/main/resources/application.yml.bak that triggered an
"Unrecognized configuration file" warning during the native build.
* feat(eks): support managed node groups (create/describe/list/delete)
aws eks create-nodegroup returned a 400 S3 error ("POST requires ?uploads
parameter") because EksController declared no route for
/clusters/{name}/node-groups, so the request fell through to S3's path-style
catch-all. Add the nodegroup REST routes (which outrank S3's templated path)
plus management-plane node group CRUD.
Node groups are emulated as catalog records that become ACTIVE immediately,
mirroring mock-mode cluster creation; no real worker nodes are provisioned
(k3s schedules pods on its built-in node in real mode).
Closes#1137
* refactor(eks): drop unused nextToken/maxResults params from listNodegroups
CloudFormationResourceProvisioner previously had no case for
AWS::StepFunctions::StateMachine, so stacks containing one fell through
to the default branch that stubs a placeholder ARN and reports
CREATE_COMPLETE without invoking StepFunctionsService. Downstream
EventBridge Pipes that target the state machine then fail at runtime
with "State machine does not exist".
Add a provisioner that:
- Resolves StateMachineName (auto-generating from logical id when absent)
- Resolves DefinitionString and applies DefinitionSubstitutions
(the same ${Var} replacement CloudFormation performs server-side)
- Resolves RoleArn, StateMachineType, and Tags
- Delegates to the existing StepFunctionsService.createStateMachine
- Sets PhysicalId to the canonical ARN (matching AWS Ref semantics)
and exposes the Arn and Name attributes for Fn::GetAtt
Also wire deletion through StepFunctionsService.deleteStateMachine.
Adds an integration test that creates a stack with substitutions,
asserts the resolved definition is stored, asserts CFN outputs return
the canonical ARN and name, and asserts deletion removes the resource.
* feat(ses): publish events to Firehose, EventBridge, and CloudWatch destinations
Extend SES V2 configuration set event publishing so destinations beyond
SnsDestination actually deliver. Previously KinesisFirehoseDestination,
EventBridgeDestination, and CloudWatchDestination were stored but the
publisher logged a warning and skipped. PinpointDestination still skips.
- KinesisFirehoseDestination → single Firehose PutRecord per event;
S3-backed streams flush accumulated records as NDJSON once the default
count threshold is reached.
- EventBridgeDestination → PutEvents entry with Source=aws.ses,
DetailType="Email <EventTypeLabel>", payload as Detail. Region is
stamped on the entry (so matchesPattern + envelope agree on a
non-default region) and Resources is always present (empty when
sourceArn is null — matchesPattern's resources-filter branch casts
entry.get("Resources") unconditionally).
- CloudWatchDestination → MetricDatum to AWS/SES with Unit=Count.
Dimensions resolved from DimensionConfigurations against EmailTags
(MESSAGE_TAG / messageTag), email headers (EMAIL_HEADER / emailHeader),
or ses:configuration-set, falling back to DefaultDimensionValue.
Timestamp left to putMetricData's epoch-seconds default.
Tests
- SesEventPublishingV2IntegrationTest @Order 14-28: per-destination
setup → send → assert, plus a cross-region (eu-west-1) EventBridge
case pinning region propagation end-to-end.
- SesEventPublisherTest (Mockito ArgumentCaptor): the EB PutEvents
entry always carries Resources as an ArrayNode — integration tests
cannot pin this because EventBridgeService.buildEventEnvelope
defaults a missing key via getOrDefault.
Docs
- docs/services/ses.md: replace the SNS-only claim with the four
supported destination types.
* fix(ses): use AWS past-tense detail-type for EventBridge SES events
The EventBridge publisher was emitting "Email Send", "Email Delivery",
etc — derived from the SNS notification eventType vocabulary by
prepending "Email ". AWS uses a separate past-tense vocabulary on
EventBridge: "Email Sent", "Email Delivered", "Email Bounced", "Email
Complaint Received", "Email Rejected", "Email Opened", "Email Clicked",
"Email Rendering Failed", "Email Delivery Delayed", "Email Subscribed"
(see https://docs.aws.amazon.com/eventbridge/latest/ref/events-ref-ses.html).
A customer rule pattern keyed on the AWS value
({"source":["aws.ses"],"detail-type":["Email Delivered"]}) would
silently fail to match Floci events.
Changes:
- Add SesEventPayload.eventBridgeDetailType returning the past-tense
EventBridge vocabulary. Kept separate from eventTypeLabel (which
remains correct for SNS notifications and CloudWatch metric names).
- SesEventPublisher.publishEventBridge uses the new mapping.
Tests
- SesEventPayloadTest.eventBridgeDetailType_matchesAwsPastTenseVocabulary:
pins all 10 mappings against AWS docs.
- SesEventPublishingV2IntegrationTest @Order 29
(eventBridge_detailTypePattern_keyedOnAwsSentValue_matches):
structural pin — creates a rule with EventPattern
{"source":["aws.ses"],"detail-type":["Email Sent"]} and asserts the
SQS target receives the SEND envelope. A regression to "Email Send"
would cause the rule to silently drop the event, failing the test
without relying on any hard-coded assertion string.
- Existing tests updated to assert the AWS values:
SesEventPublishingV2IntegrationTest 4 assertions; sdk-test-java
SesEventPublishingTest 3 assertions.
* fix(ses): emit CloudWatch metric name "RenderingFailure" without space
AWS CloudWatch metric publishing for SES uses "RenderingFailure" (no
space) for the RENDERING_FAILURE event type — verified against real
AWS by configuring a CW event destination on a configuration set,
sending a templated email with a missing TemplateData key to trigger
the rendering failure path, and capturing the new metric name from
`aws cloudwatch list-metrics --namespace AWS/SES`.
Floci's publisher was previously sourcing the CW MetricName from
SesEventPayload.eventTypeLabel, which returns "Rendering Failure" (with
space). That spelling is correct for the SNS notification's eventType
field but wrong for CloudWatch — customer dashboards / alarms keyed on
the AWS-correct "RenderingFailure" never see Floci's metric.
Changes:
- Add SesEventPayload.cloudWatchMetricName returning the CW spelling.
Mirrors eventTypeLabel for every other case so the two stay aligned
in shape; only RENDERING_FAILURE differs.
- SesEventPublisher.publishCloudWatch uses the new mapping.
- SesEventPayloadTest.cloudWatchMetricName_matchesAwsCwSpelling pins
all 10 mappings; RENDERING_FAILURE expectation comes from the live
AWS capture rather than an AWS docs guess.
DELIVERY_DELAY remains as "DeliveryDelay" in this commit — it could
not be triggered conveniently from the SES sandbox (needs genuine SES
backoff), so leaving the existing value rather than guessing. Flagged
in code comments as needing future verification.
The other simple metric names (Send, Delivery, Bounce, Complaint) were
also verified against the same AWS capture and match Floci's existing
spelling byte-for-byte — no change needed for those.
* feat(ec2): implement default security group and main route table creation for VPC
* fix(ec2): update route table association check to use boolean value
* test(ec2): update security group test to validate group name and VPC ID
* fix(ec2): update security group description in Ec2Service and corresponding tests
* test(ec2): fix integration test failures
* fix(ec2): fix integration test error
* feat(ec2): update description
* fix(ec2): fix SG id to use 17 character hex code
* feat(cloudmap): add AWS Cloud Map (servicediscovery) management API
Implements the Route53AutoNaming_v20170314 JSON 1.1 service: namespace
management (HTTP/public-DNS/private-DNS), services, instance register/
deregister, async operation tracking, DiscoverInstances/DiscoverInstancesRevision
(honouring the data- host prefix), instance health status, and tags.
Dispatched via AwsJson11Controller; storage through StorageFactory; config in
EmulatorConfig + application.yml. Covered by an in-repo RestAssured integration
test and an AWS SDK v2 ServiceDiscoveryClient compatibility test.
* refactor(cloudmap): drop unused prefix variable in scanInstances
EKS cluster creation and managed node groups attach a set of AWS managed
policies that floci did not seed, so GetPolicy / AttachRolePolicy failed with
NoSuchEntity (e.g. AmazonEKSClusterPolicy, AmazonEKSVPCResourceController),
breaking the terraform-aws-modules/eks module and the EKS console flow.
Add the standard set to the seeded catalog (all path "/"):
AmazonEKSClusterPolicy, AmazonEKSServicePolicy, AmazonEKSVPCResourceController,
AmazonEKSWorkerNodePolicy, AmazonEKS_CNI_Policy. Documented in the IAM managed
policy catalog (docs/services/iam.md).
Closes#1092