mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
5afb60d0f55e00aeb555a08ecc7d9ce8305bc545
43
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ecad6acf58 |
feat(swf): add Simple Workflow Service emulation (#2257)
* feat(swf): add Simple Workflow Service emulation
Implements all 39 SWF operations over the JSON 1.0 protocol
(X-Amz-Target: SimpleWorkflowService.*): domain and type registration,
the workflow execution state machine, and the decider/worker task
lifecycle.
Behaviour was derived from botocore's swf-2012-01-25 model and verified
against the live service, which drove several details that are easy to
get wrong from the model alone:
- Faults carry a namespaced __type (com.amazonaws.swf.base.model#Fault)
in the body but the bare fault name in x-amzn-query-error. botocore
prefers the header, so a namespaced value there makes the CLI print
"com.amazonaws.swf.base.model#UnknownResourceFault" where SWF prints
"UnknownResourceFault". SwfException keeps the two spellings apart.
- Timestamps are epoch-second numbers, not ISO strings.
- Void operations answer 200 with an empty body rather than {}.
- An idle poll returns taskToken "" rather than omitting the member;
the SDKs read the empty token as "no task".
- ActivityTaskTimedOut reports startedEventId 0 for a task that never
started, and WorkflowExecutionStarted reports parentInitiatedEventId 0
on root executions, rather than omitting either member.
State machine:
- One decision task outstanding per execution. Events arriving while one
is outstanding set a pending flag that is satisfied when it completes,
so a signal cannot produce two concurrent decision tasks.
- Decisions apply in order; a decision after a closing decision is
dropped. A decision that cannot be applied appends its *Failed event
with the AWS cause and gives the decider a fresh task instead of
failing the request.
- Closing with open activities, timers, or children appends
UNHANDLED_DECISION and leaves the execution open.
- Timeouts (activity schedule-to-start, start-to-close,
schedule-to-close, heartbeat; decision start-to-close; execution
start-to-close; timers) expire from one background sweep rather than a
timer per task, so a restart leaves nothing to reconcile.
- Child executions link to their parent and report their outcome back;
the closing parent's childPolicy is applied to open children.
Tests: 29 unit tests drive timeout expiry through a controllable clock,
32 integration tests assert the wire shapes and fault strings captured
from the live service, and a compatibility suite exercises the same
flows through the AWS SDK v2 client so responses must deserialize into
the generated model and faults into typed exceptions.
Long polling, ScheduleLambdaFunction invocation, and retention-based
pruning are not implemented; docs/services/swf.md records each.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): report the child-started event id on ChildWorkflowExecution* events
A ChildWorkflowExecution* event carries two correlation ids, and they point at
different events in the parent's history: initiatedEventId is the
StartChildWorkflowExecutionInitiated id, startedEventId is the
ChildWorkflowExecutionStarted id. Both were reported as the initiated id, so a
decider correlating a child's outcome on startedEventId matched the wrong event.
Verified against the live service, where a parent that starts one child and sees
it complete produces:
5 StartChildWorkflowExecutionInitiated
6 ChildWorkflowExecutionStarted {initiatedEventId: 5}
8 ChildWorkflowExecutionCompleted {initiatedEventId: 5, startedEventId: 6}
The child now records the parent's ChildWorkflowExecutionStarted id at start
time and reports it back on every ChildWorkflowExecution* event.
The integration test asserts both ids against the events they name rather than
against a "greater than zero" placeholder, and fails on the previous behaviour
with "startedEventId Expected: <6> Actual: <5>".
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): reject a decision batch whose closing decision is not last
RespondDecisionTaskCompleted accepted a batch with decisions after a closing
decision and silently dropped the remainder. The live service rejects the whole
batch instead:
HTTP 400
{"__type":"com.amazon.coral.validate#ValidationException",
"message":"Close must be last decision in list"}
Silently accepting it hides a decider bug and diverges on both the status code
and the response body, so a decider that ships a malformed batch sees success
locally and a 400 against AWS.
The batch is now validated before any state is mutated, matching the live
service's behaviour of leaving the decision task outstanding so the decider can
retry with a corrected batch. Note this fault is namespaced
com.amazon.coral.validate rather than com.amazonaws.swf.base.model.
Tests assert the status code, both fault spellings, the message, that no
DecisionTaskCompleted event is appended, and that the same task token still
works afterwards. They fail on the previous behaviour with "Expected status code
<400> but was <200>".
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): name the scheduled event when an activity task has already closed
An activity task token that resolves to a task which is no longer open reported
"Unknown or expired task token". The live service distinguishes the two cases: a
genuine token whose task has closed names the scheduled event instead, because
the token itself was valid.
Captured from the live service, heartbeating a task that a cancel had already
closed:
HTTP 400
{"__type":"com.amazonaws.swf.base.model#UnknownResourceFault",
"message":"Unknown activity, scheduledEventId = 5"}
Both cases are UnknownResourceFault, so SDK error typing was already correct and
only the message diverged — but a worker that logs or matches on the message sees
a different string locally than against AWS.
A token that never existed still reports the bad token; only a resolved token on
a closed task reports the scheduled event. This required keeping the token's map
entry when an activity closes, since removing it made both cases indistinguishable;
reuse is still refused by the existing open-state check.
Test asserts both branches and fails on the previous behaviour with "expected:
<Unknown activity, scheduledEventId = 5> but was: <Unknown or expired task token>".
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): serialize execution mutation per domain and guard the sweep interval
Addresses three review findings.
Concurrent StartWorkflowExecution calls for one workflowId all scanned for an
open run before any of them inserted, so each persisted its own run key. Eight
concurrent starts produced eight open runs where SWF admits one, and later
operations without a runId then selected an arbitrary run. The open-run check
and the insert are now one atomic step.
A closing execution mutates its parent (ChildWorkflowExecution* events) and its
children (childPolicy), but held only its own lock, so event-id allocation and
the history list raced. Six children closing against one parent reproduced
ConcurrentModificationException.
Both come from the same mismatch: the lock was per execution while the
invariants span an execution family. The lock is now per domain. A parent and a
child always share a domain, so one lock covers the family and never has to be
nested — nesting would deadlock, since a closing child takes its parent while a
closing parent takes its children. Per-domain granularity is sufficient here:
the emulator serves a single developer's workload, not production concurrency.
A zero or negative timeout-sweep interval reached scheduleWithFixedDelay, which
threw IllegalArgumentException out of the StartupEvent observer and stopped the
whole emulator becoming ready — one bad SWF setting taking down every other
service. A non-positive interval now falls back to 1s with a warning.
Tests fail on the previous behaviour with "expected: <1> but was: <8>",
ConcurrentModificationException, and IllegalArgumentException respectively.
Verified over the wire too: eight concurrent starts yield one success, seven
WorkflowExecutionAlreadyStartedFault, and one open run.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): report the live service's TypeNotDeprecatedFault message
DeleteWorkflowType/DeleteActivityType against a still-registered type
reported the type descriptor, e.g. "WorkflowType=[name=W, version=1]". The
live service answers with prose instead, and uses the same wording for both
type kinds:
{"__type":"com.amazonaws.swf.base.model#TypeNotDeprecatedFault",
"message":"The type is currently registered and cannot be deleted in its
current state"}
Since both variants are identical, the two fault factories collapse into one.
The descriptor form is still correct for the other type faults
(TypeDeprecatedFault, TypeAlreadyExistsFault, UnknownResourceFault), which were
verified unchanged in the same probe.
Also adds integration coverage for the five actions that had none at either
test layer: DeprecateActivityType, UndeprecateActivityType, DeleteActivityType,
ListWorkflowTypes, and RespondActivityTaskFailed. Every assertion is taken from
a live-service capture, including that scheduling a deprecated activity type
appends ScheduleActivityTaskFailed with cause ACTIVITY_TYPE_DEPRECATED and
leaves the execution open, that ListWorkflowTypes filters by registration
status and name, and that a second RespondActivityTaskFailed on the same token
reports "Unknown activity, scheduledEventId = 5".
The message tests fail on the previous behaviour with "Expected: The type is
currently registered ... Actual: WorkflowType=[name=TestWf, version=1.0]".
Signed-off-by: Andre Kurait <akurait@amazon.com>
* feat(swf): invoke real Lambda functions for ScheduleLambdaFunction
The decision was recorded as ScheduleLambdaFunctionFailed with cause
LAMBDA_SERVICE_NOT_AVAILABLE_IN_REGION rather than invoking anything. SWF is
otherwise a pure coordination service — deciders and activity workers are the
user's own processes, so there is no user code for the emulator to run — but
ScheduleLambdaFunction is the one decision where SWF itself executes something,
and Floci already runs Lambda functions in containers. A decider that fans work
out to Lambda could not be exercised locally at all.
Floci now invokes the function through its own Lambda service, the same way the
EventBridge and Scheduler invokers do, and records the outcome. Verified against
the live service:
5 LambdaFunctionScheduled {control, id, input, name, startToCloseTimeout}
6 LambdaFunctionStarted {scheduledEventId: 5}
7 LambdaFunctionCompleted {result, scheduledEventId: 5, startedEventId: 6}
8 DecisionTaskScheduled
Four behaviours came from that capture and are easy to get wrong:
- A function that cannot be resolved is LambdaFunctionFailed with Lambda's own
error code as reason (ResourceNotFoundException) — not
ScheduleLambdaFunctionFailed — and it still reports Started first.
- An execution with no lambdaRole never starts the function at all: Scheduled is
followed by StartLambdaFunctionFailed with cause ASSUME_ROLE_FAILED and the
message "No IAM role is attached to the current workflow execution."
- lambdaRole resolves from StartWorkflowExecution's lambdaRole, falling back to
the workflow type's defaultLambdaRole, and is echoed in the started event.
- An absent input reaches the handler as {}, and reusing an id is accepted —
there is no ID_ALREADY_IN_USE for Lambda the way there is for activity ids.
SwfService takes a LambdaInvoker seam rather than LambdaService directly, so the
unit tests keep running without a Docker daemon while SwfLambdaInvoker wires the
real thing at runtime. The invocation is RequestResponse because the response
body is what gets recorded as result; the fire-and-forget invokers use Event for
the opposite reason.
The Lambda region comes from the execution's domain ARN, so a workflow in one
region does not invoke a function in another.
Tests: SwfServiceTest covers all four paths against a recording invoker and
fails on the previous behaviour with "the function must actually be invoked
==> expected: <1> but was: <0>". SwfLambdaIntegrationTest and the SDK
compatibility SwfLambdaTest deploy a real function and assert the recorded
result is what the container returned, so neither passes against a synthesised
event. Docker-backed cases live in their own class so a Docker-less run loses
only them rather than the whole SWF wire suite.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(swf): scope state by region and paginate the registration lists
Addresses two AWS compatibility gaps from review.
SWF names are unique per region, but storage keys were the bare name, so
registering a domain in us-east-1 made the same name in eu-west-1 fail as a
duplicate, and describe/list could return the first region's domain and ARN.
Verified against the live service: the same name registers in both regions with
independent descriptions and retention periods, each ARN naming its own region;
a type registered in one region answers UnknownResourceFault in the other; and
executions, including their runIds, do not cross.
Keys are now region-qualified — `<region>:<domain>` for domains,
`<region>:<domain>/<name>/<version>` for types, and
`<region>:<domain>/<workflowId>/<runId>` for executions — and every store scan
is prefixed by region. The region reaches the service on each call and is stored
on the execution, which is also what task tokens resolve through, so a token
issued in one region cannot address another's execution. The per-domain
mutation lock is region-qualified too; leaving it bare would have let two
regions serialize against each other, and would have disagreed with the
sweeper's own lock derived from the storage key.
ListDomains, ListWorkflowTypes and ListActivityTypes ignored maximumPageSize and
nextPageToken and returned everything. They now share one paging helper with the
history and execution listings. Details taken from live captures rather than the
docs: nextPageToken is absent on the final page even when that page is exactly
full, a maximumPageSize of 0 or absent means "no caller limit", above 1000 is
rejected rather than clamped, and a corrupt token answers
`ValidationException: Invalid token` instead of silently restarting at the first
page — which would make a paging loop repeat forever.
Adds AWS SDK regression tests (SwfRegionPaginationTest) driving two clients at
different regions against the same emulator, plus wire-level integration
coverage. Against the previous implementation those SDK tests fail with
DomainAlreadyExists on the second region, "maximumPageSize must cap the page: 5",
and nothing thrown for an oversized page size.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test(swf): pin reverseOrder as applying before pagination
The registration lists reverse the whole result set and then page it, so with
maximumPageSize=3 and reverseOrder=true the first page is the tail of the
ascending order. That was already the behaviour but nothing asserted it, and the
shared paging helper makes "page first, then reverse the page" an easy
regression to introduce.
Measured against the live service: 5 types at page size 3 reversed returns
Paged4, Paged3, Paged2 and then Paged1, Paged0. Injecting the page-then-reverse
ordering fails the new test with
"Expected: <[Paged4, Paged3, Paged2]>".
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test(swf): cover region scoping at the wire level
The region-scoping tests went in at the service and SDK layers, but every
SwfIntegrationTest request omitted an Authorization header, so nothing asserted
that the region is read from the SigV4 credential scope — the step that decides
which region's state a call addresses.
Adds a wire test that sends a credential scope naming the region, covering the
same name registering in two regions with independent descriptions, retentions
and ARNs, a type being unknown in the other region, and a same-region
re-registration still faulting.
Against
|
||
|
|
40e8aad55a |
feat(lambdamicrovms): AWS Lambda MicroVMs service module and its CloudFormation types (#2079)
* feat(lambdamicrovms): AWS Lambda MicroVMs service module Adds the Lambda MicroVMs control plane, a service AWS took GA on 2026-06-22: MicroVM images with a version and build lifecycle, the managed base-image catalog, MicroVM CRUD, and VPC egress network connectors. Two service models rather than one. Lambda Microvms (apiVersion 2025-09-09) carries images and MicroVMs under /2025-09-09; Lambda Core (2026-04-30) carries network connectors under /2026-04-04. Both sign as lambda, so their requests arrive under the existing lambda claim in ResolvedServiceCatalog and route by path. Neither prefix collides with anything LambdaController serves, and both are enabled by the lambda service rather than adding a toggle. Tagging rides the classic /2017-03-31/tags/ routes, so LambdaTagController learns the MicroVM ARN forms. Resources are stored per account and region. Floci resolves a per-request account in AccountContextFilter and these ARNs carry it, so region-only storage would let two accounts sharing a region read and mutate each other's images, MicroVMs and connectors. Wire shapes come from the vendored service models and, where the models are silent or disagree with the service, from responses recorded against live AWS. Several members the models mark optional are enforced in practice — a connector needs ClientToken, OperatorRole, NetworkProtocol and AssociatedComputeResourceTypes despite all four being optional in Smithy — and several resources are returned in a different projection per operation: an image in four shapes, a connector in four, with only the list summaries carrying Type. Builds converge instantly rather than on a timer, the usual emulator trade. Where that would otherwise produce an inconsistent body it is handled explicitly: a create or update reports the transitional state and does not name the version it is minting as active, because a client reading otherwise would launch a MicroVM off a version that does not exist yet. Auth tokens, the per-VM endpoint, and the idle and suspend timers are deliberately out of scope here; they belong to a full-fidelity MicroVMs emulator rather than to CloudFormation provisioning. Verified against a suite of responses recorded from live AWS (https://github.com/INTENTIUS/m80): 26 checks over the image, MicroVM and connector lifecycles, 0 failures. * feat(cloudformation): provision AWS::Lambda::MicrovmImage and AWS::Lambda::NetworkConnector Registers a CfnResourceProvisioner for the two MicroVM CloudFormation types against the LambdaMicrovmsService added alongside, so a template declaring either provisions and deletes rather than being skipped. Uses the CloudFormationResourceRegistry interface rather than the switch in CloudFormationResourceProvisioner, following SqsCfnProvisioner. * test(lambdamicrovms): AWS CLI compatibility coverage for images, MicroVMs and connectors * fix(lambdamicrovms): wire service state through StorageFactory Images, MicroVMs and connectors were held in plain in-memory maps, so in persistent mode a restarted Floci lost them while the CloudFormation stacks that created them survived. Those stacks then referenced resources that no longer existed and DeleteStack failed on the 404. The three stores are now StorageBackedMap over StorageFactory backends, keyed region/id. MicroVMs are delivered as part of the lambda service, so they share its storage key and therefore its configured mode and flush interval rather than declaring their own. The account half of the key is dropped from the service and left to the backend, which prefixes and strips the same account the RegionResolver returns, so region and account isolation are unchanged. StorageBackedMap only marks the backend dirty on put and remove, so every path that mutated a stored object in place now writes it back: image update, version status, version delete, rebuild, MicroVM settle and terminate, connector settle and update, and both tag paths. * style(core): import the lambda microvms controllers in the service catalog * fix(lambdamicrovms): register the persisted types for reflection Moving images, microvms and connectors into StorageBackedMap made their model classes persisted types, and PersistedModelReflectionTest fails on any that lack @RegisterForReflection because native-image persistence cannot rebuild them on restart. |
||
|
|
d78520d5cb |
feat(kinesisanalytics): add Managed Service for Apache Flink (Kinesis Analytics V2) (#1914)
* feat(kinesisanalytics): add Managed Service for Apache Flink (Kinesis Analytics V2)
Adds the kinesisanalyticsv2 service (X-Amz-Target KinesisAnalytics_20180523.*):
a control-plane state machine plus a real Apache Flink JobManager container spun up
as a sidecar on StartApplication, modeled on the AmazonMQ->RabbitMQ pattern.
- CreateApplication -> READY, StartApplication -> STARTING -> RUNNING via a readiness
poller, StopApplication -> READY, DeleteApplication -> removed
- Container image chosen from the requested RuntimeEnvironment (FLINK-1_15..1_20 ->
apache/flink:1.x) via KinesisAnalyticsRuntimes, with an optional operator override;
unsupported runtimes (SQL / Zeppelin) rejected with InvalidArgumentException
- Container naming via ContainerStorageHelper.resourceName (floci-kinesisanalytics-<name>)
- Registered in ResolvedServiceCatalog, dispatched by AwsJson11Controller; container
teardown wired into EmulatorLifecycle.onStop
- Tests: service + handler unit tests, @QuarkusTest integration, Java SDK compatibility test
- Docs: service page, services index, README, environment-variable reference
* fix(kinesisanalytics): enforce delete/update state and version/timestamp guards
Addresses review feedback (self-review + Greptile) on the Managed Flink service:
- DeleteApplication rejects a non-READY (RUNNING/STARTING) application with
ResourceInUseException; the caller must StopApplication first (Greptile P1)
- DeleteApplication validates the required CreateTimestamp against the stored value
- UpdateApplication validates CurrentApplicationVersionId (ConcurrentModificationException
on mismatch, InvalidArgumentException when absent)
- StopApplication error message reads 'RUNNING or STARTING' to match the guard
- Readiness poller @PreDestroy awaits termination (bounded) before returning so a
mid-flight write cannot race the shutdown storage flush
- Drop the unused Tags field from FlinkApplication (full tag support tracked as a follow-up)
- Compat test @AfterAll logs tolerated teardown failures (AGENTS.md) and stops before delete
Tests updated accordingly and verified live against the packaged jar.
* feat(kinesisanalytics): deploy and run the application JAR on the Flink cluster
Implements real job submission for Managed Service for Apache Flink, so the AWS
'deploy a JAR' flow actually runs the job (previously only a bare JobManager reached RUNNING):
- CreateApplication parses and stores ApplicationConfiguration (ApplicationCodeConfiguration
S3ContentLocation + ParallelismConfiguration); DescribeApplication echoes it back as
ApplicationConfigurationDescription
- StartApplication reads the JAR from Floci's local S3 (via S3Service), starts a JobManager plus a
TaskManager (sharing the JobManager network namespace for localhost RPC), then uploads and runs the
JAR via the Flink REST API (new FlinkRestClient); the app reaches RUNNING when the Flink job is RUNNING
- StopApplication cancels the job and tears down both containers
- Applications created without code still come up as a bare cluster
- Docs + README updated; unit tests for config round-trip; verified live end-to-end against the
packaged jar (S3 JAR -> RUNNING Flink job -> stop/delete cleanup)
Not yet emulated: EnvironmentProperties injection, snapshots/savepoints, in-place code updates.
* fix(kinesisanalytics): align Flink runtimes with AWS and add the 2.x line
The runtime map now mirrors the runtimes AWS Managed Service for Apache Flink actually offers:
- Add FLINK-2_0 / 2_1 / 2_2 / 2_3 -> apache/flink:2.0/2.1/2.2/2.3 (the Flink 2.x line; FLINK-2_2 is in
the AWS SDK RuntimeEnvironment enum and the whole 2.x line has published apache/flink images)
- Remove FLINK-1_16 / FLINK-1_17 -> AWS does not offer these runtimes, so Floci should reject them too
rather than accept versions real AWS refuses
Supported set: FLINK-1_15, 1_18, 1_19, 1_20, 2_0, 2_1, 2_2, 2_3. Tests + docs + README updated.
* test(kinesisanalytics): cover both Flink 1.18 and 2.3 in the SDK compat test
Refactor the single-runtime compat test into an abstract ordered lifecycle run against two
runtimes, so the suite guards both the Flink 1.x and 2.x lines (Flink 2.0 changed the config
system and boots slower):
- AbstractKinesisAnalyticsV2LifecycleTest: PER_CLASS instance state + the create->start->RUNNING->
list->stop->unsupported->delete lifecycle, parameterized on an abstract runtime()
- KinesisAnalyticsV2Flink118Test (FLINK-1_18) and KinesisAnalyticsV2Flink23Test (FLINK-2_3)
- FLINK-2_3 is passed as a string (newer than the pinned SDK 2.44.14 enum) and asserted via
runtimeEnvironmentAsString(); RUNNING wait bumped to 300s for Flink 2.x's slower boot
Verified live: both subclasses boot real apache/flink:1.18 and :2.3 clusters and reach RUNNING
(0 skipped). CI now exercises two clusters; both skip gracefully when Docker is unavailable.
* fix(kinesisanalytics): preserve AwsException from a bad application-code S3 location
StartApplication's catch(RuntimeException) wrapped every failure from startCluster into
InternalFailureException (HTTP 500) — including the AwsException that readJar throws when the
application-code S3 object is missing/empty/unreadable. A client's bad S3 code location therefore
surfaced as a 500 server error instead of the intended InvalidArgumentException (400).
Now AwsException propagates as-is (preserving its error code and message); only unexpected
RuntimeExceptions (e.g. Docker unavailable) become InternalFailureException. Addresses Greptile P1.
* feat(kinesisanalytics): add resource tagging (TagResource/UntagResource/ListTagsForResource)
Adds Tags support to CreateApplication plus TagResource, UntagResource, and
ListTagsForResource, dispatched as regular JSON1.1 actions under the same
KinesisAnalytics_20180523 target prefix as every other action — verified
against the real botocore kinesisanalyticsv2 model that this API has no
separate REST tagging endpoint (protocol is pure "json"/1.1 with all
operations on POST /), unlike REST-JSON services (EKS, MWAA) that use the
shared /tags/{arn} controller.
Tags is a list of {Key, Value} objects on the wire (not a map), same shape
MemoryDB's handler already uses for its own tagging actions; mirrored that
parse/build pattern rather than the map-shaped TagHandler interface. Tags
are stored on FlinkApplication but, matching the real API, never echoed in
ApplicationDetail (CreateApplication/DescribeApplication) — only
ListTagsForResource returns them. TagResource enforces AWS's 50
user-defined-tag ceiling (TooManyTagsException) on both CreateApplication
and TagResource.
docs/services/kinesisanalytics.md's action table is auto-generated from the
handler source (tools/docs/regen_action_docs.py) — regenerated it and filled
in the three new rows' hand-written descriptions.
* feat(kinesisanalytics): inject EnvironmentProperties into the Flink cluster
CreateApplication now accepts ApplicationConfiguration.EnvironmentProperties
.PropertyGroups and writes them to /etc/flink/application_properties.json in
both the JobManager and TaskManager containers before the job runs — the
same well-known path and JSON shape (a list of {PropertyGroupId, PropertyMap}
objects, matching the AWS API's own PropertyGroups shape) real Managed
Service for Apache Flink uses, so a JAR written against
KinesisAnalyticsRuntime.getApplicationProperties() picks them up unmodified
against Floci. DescribeApplication echoes them back under
ApplicationConfigurationDescription.EnvironmentPropertyDescriptions
.PropertyGroupDescriptions.
/etc/flink does not exist in the stock apache/flink image, and the
container's non-root "flink" user (uid 9999) can't create it directly under
/etc (confirmed live: mkdir -p /etc/flink fails with permission denied as
that user). The fix, also verified live: name the tar entry
"flink/application_properties.json" and extract into the existing /etc
rather than targeting /etc/flink directly — the daemon-level copy API can
create the missing subdirectory as part of unpacking the archive even
though the in-container user couldn't, landing as root:root 775 (so it's
still world-readable by the flink user). A real apache/flink:1.18 container
was used to verify both the failure mode and the fix before writing the
Java implementation.
* feat(kinesisanalytics): add application snapshot (savepoint) support
Adds CreateApplicationSnapshot/DescribeApplicationSnapshot/ListApplicationSnapshots/
DeleteApplicationSnapshot. Triggers a real Flink savepoint of the running job and
polls it to completion the same way StartApplication polls job readiness. Snapshot
files land on a persistent named Docker volume mounted at /opt/flink/savepoints in
the JobManager container, so they survive a Stop/Start cycle; the volume is only
removed on DeleteApplication.
* feat(kinesisanalytics): support in-place application code updates
UpdateApplication with a new ApplicationCodeConfigurationUpdate (or
ParallelismConfigurationUpdate) now redeploys onto an already-running application
without tearing down its JobManager/TaskManager containers: the current job is
cancelled and the new JAR is uploaded and run on the same cluster, transitioning
RUNNING -> STARTING -> RUNNING the same way StartApplication submits a fresh job.
Updating a READY application just stores the new code location for the next
StartApplication. Attaching code to a running bare cluster for the first time is
not yet supported and is rejected with InvalidRequestException.
* fix(kinesisanalytics): use AWS's documented generic InternalFailure code
startApplication and updateApplication's redeploy-code path threw an invented
"InternalFailureException" for unexpected Docker provisioning failures — not a
shape kinesisanalyticsv2's model declares (no operation in this API declares any
5xx shape at all). AWS documents "InternalFailure" (no "Exception" suffix, HTTP
500) as the generic error common to every service's API; it's also already the
default used elsewhere in this codebase (JsonErrorResponseUtils, KMS, Pricing,
SES, CloudControl, EventBridge, and others).
* feat(kinesisanalytics): add CreateApplicationPresignedUrl and SnapshotsEnabled
CreateApplicationPresignedUrl returns a URL to the running application's Flink
Dashboard (UrlType: FLINK_DASHBOARD_URL only; Zeppelin/Studio isn't supported).
Floci has no real session/proxy layer for this, so it returns the JobManager
container's own REST/dashboard URL directly, while still validating UrlType and
SessionExpirationDurationInSeconds against AWS's documented constraints.
ApplicationSnapshotConfiguration.SnapshotsEnabled (default true, matching real
AWS) is now honored on CreateApplication and toggleable via UpdateApplication's
ApplicationSnapshotConfigurationUpdate; CreateApplicationSnapshot rejects the
request with InvalidRequestException while disabled.
* fix(kinesisanalytics): persist flinkJobId as soon as the job is submitted
The readiness poller only called putApplication when advanceToRunning reported
RUNNING, not when it merely assigned flinkJobId after submitting the job (which
returns false until the job state catches up). pendingJars — a separate,
in-process-only cache — is already cleared by that point, so an emulator
restart between job submission and reaching RUNNING would leave the
application stuck: no persisted flinkJobId to resume polling, and no cached
JAR left to resubmit.
|
||
|
|
7e4e3e8c50 |
feat(mwaa): add Amazon MWAA emulation backed by real Airflow (LocalExecutor) (#2086)
* feat(mwaa): add Amazon MWAA emulation backed by real Airflow (LocalExecutor)
Adds a new services/mwaa package following the EKS lifecycle pattern
(Controller/Service/EnvironmentManager, one Docker container-set per
resource, readiness polling) and the Neptune/ElastiCache proxy pattern
(MwaaWebProxy/MwaaProxyManager: Floci owns the host-facing port, the
backing container stays internal-only).
Each environment is backed by two real containers — postgres:16-alpine
for the metadata DB and apache/airflow:<version>-python3.12 running
LocalExecutor — with AirflowVersion genuinely selecting the image tag
(validated against a configured allow-list), unlike EKS's cosmetic-only
version field. MwaaWebProxy fronts the real Airflow webserver and
intercepts POST /aws_mwaa/cli, bridging it to a docker-exec'd `airflow`
CLI call and returning the documented {stdout, stderr} shape.
DAGs and requirements.txt sync from S3 on a poller, reusing the existing
S3Service in-process rather than a new AWS-facing surface. The Airflow
container is pointed back at Floci via LaunchedContainerAwsEnv (the same
mechanism Lambda/ECS containers already use), so a DAG's own boto3 calls
resolve against Floci instead of real AWS.
StartupScriptS3Path is supported end-to-end: fetched from S3 at create
time, injected before the container starts (create -> inject -> start,
mirroring EksClusterManager's config-injection sequencing), sourced
before migrate/scheduler/webserver so exported vars propagate. The
airflow user gets a passwordless sudo grant (verified against the real
image — sudo ships but isn't passwordless by default, and AWS's own
startup-script examples assume sudo just works), and a fixed set of
Floci-critical env vars (Fernet key, DB DSN, executor, AWS-SDK-redirection
vars) are snapshotted before and restored after the script runs, mirroring
real MWAA's reserved-environment-variable protection.
Verified end-to-end against real Docker (not just the mock=true unit
suite): environment reaches AVAILABLE, proxy pass-through and the CLI
bridge both work with real output, a DAG uploaded to S3 syncs and parses,
a second environment on a different AirflowVersion pulls a genuinely
distinct image, and delete tears down both containers/volumes and the
proxy cleanly.
45 new tests (unit + RestAssured integration, all against mock=true in
the default suite so Docker is never required for `mvnw test`); full
suite otherwise unchanged.
* fix(mwaa): hard-fail startup-script injection failures, release proxy ports on delete
Two issues from review:
copyFileIntoContainer swallowed every failure identically, including the
one case where that's wrong: a configured StartupScriptS3Path that fails
to copy into the container. The entrypoint's "if [ -f /startup.sh ]"
guard would silently skip it and the environment would reach AVAILABLE
having never applied the requested setup, contradicting the documented
intent of gating environment creation on startup-script failure (matching
real MWAA). copyFileIntoContainer now reports success/failure; the
startup-script call site checks it and throws, while DAG sync and the
best-effort sudoers grant keep their existing soft-fail behavior.
deleteEnvironment allocated a proxy port via PortAllocator on create but
never released it on delete, unlike every other service that uses
PortAllocator (Lambda, MSK, EC2, ECR) — repeated create/delete cycles
would eventually exhaust the configured proxy port range even with zero
MWAA proxies actually running.
* fix(mwaa): roll back allocated proxy port and containers on create failure
If startEnvironment() succeeded (containers running) but PortAllocator.allocate
or MwaaProxyManager.startProxy failed afterward, createEnvironment's catch
block set CREATE_FAILED without releasing the reserved port or stopping the
containers that had already started — leaking both on every such failure.
Mirrors NeptuneService.createDbCluster/rollbackDbCluster's already-proven
shape for this exact class of problem (container + proxy + port, partial
failure must roll back everything): a provisioned flag set only after every
step succeeds, and a try/finally that runs rollbackFailedCreate whenever it
doesn't — stopping the proxy (a no-op if it never started), stopping any
containers that did start (MwaaEnvironmentManager.stopEnvironment already
null-checks each container id, so it's safe for partial startup too), and
always releasing the port.
* fix(mwaa): correct CreateEnvironment error shape, namespace container names, add docs
Two items from maintainer review:
- Duplicate CreateEnvironment threw ResourceAlreadyExistsException, a shape the
operation doesn't declare (verified against the real botocore mwaa/2020-07-01
model: CreateEnvironment's only errors are ServiceUnavailableException,
ValidationException, InternalServerException) — SDK clients couldn't map it.
Now throws ValidationException.
- dbContainerName/airflowContainerName built names via raw string concatenation
instead of routing through ContainerStorageHelper.dockerName like every other
Docker-backed service (EKS, RDS, ...), so MWAA alone didn't participate in the
FLOCI_DOCKER_RESOURCE_NAMESPACE convention that keeps multiple Floci instances
sharing one Docker daemon from colliding. Both static methods now take the
EmulatorConfig and route through the shared helper; volume names inherit the
fix automatically since they're built by extending the container name.
Also adds docs/services/mwaa.md (mkdocs nav updated) following eks.md's
structure — operations table, mock/real mode, the web/CLI proxy, startup-script
behavior (sudo grant, reserved-variable protection), config reference, ARN
format, CLI/SDK examples, and an honest "Not Implemented" section covering the
known gaps already discussed on the PR (PluginsS3Path, cross-account container
naming, restart restoration).
|
||
|
|
aadc93e306 |
feat(rum): add CloudWatch RUM app-monitor service (#1797)
* feat(rum): add CloudWatch RUM app-monitor service
Adds a minimal CloudWatch RUM service (restJson1) covering the app-monitor
lifecycle — CreateAppMonitor, GetAppMonitor, UpdateAppMonitor, DeleteAppMonitor,
ListAppMonitors — backed by an in-memory store.
Previously restJson1 RUM requests (e.g. POST /appmonitor) fell through to the S3
path-style catch-all (@Path("/{bucket}")) and returned an XML error that
restJson1 SDKs (and the CDK AwsCustomResource used for RUM AppMonitor custom
resources) cannot parse. Literal /appmonitor and /appmonitors paths take JAX-RS
precedence over S3's /{bucket} template (the same mechanism eks/mq use), so the
routes win with no extra routing wiring.
Verified with aws-cli 2.33.18 against a dev-mode emulator: CreateAppMonitor
returns an Id, GetAppMonitor/ListAppMonitors round-trip, DeleteAppMonitor then
GetAppMonitor returns ResourceNotFoundException.
* fix(rum): make monitor updates atomic
* fix(rum): align app monitor lifecycle with AWS
* chore: retry flaky Node compatibility check
* fix(rum): address app-monitor review feedback
---------
Co-authored-by: abanna <abanna@users.noreply.github.com>
|
||
|
|
024d74e5c4 |
feat(cloudtrail): in-process CloudTrail with S3 data event emission (#1460)
* feat(cloudtrail): in-process CloudTrail with S3 data event emission
New service supporting CreateTrail / DescribeTrails / DeleteTrail /
UpdateTrail / PutEventSelectors / GetEventSelectors / StartLogging /
StopLogging / GetTrailStatus.
S3 ops (PutObject / GetObject / HeadObject / DeleteObject / ListObjects
/ GetObjectAcl) emit CloudTrail data events through a per-trail buffer.
The CloudTrailLogWriter scheduler flushes pending records as gzipped
JSON envelopes into the destination bucket at AWS-shaped key paths
(AWSLogs/<account>/CloudTrail/<region>/yyyy/MM/dd/<file>.json.gz) on
a configurable cadence (default 60s).
IAM-enforcement denials emit matching AccessDenied records by hooking
IamEnforcementFilter. IamActionRegistry now distinguishes
s3:GetObjectAcl / PutObjectAcl / {Get|Put|Delete}ObjectTagging from
their base ops via ?acl / ?tagging query parameters so the right
event names land in the trail.
Seeded AWSCloudTrail_FullAccess / _ReadOnlyAccess managed policies.
* fix(cloudtrail): return LatestDeliveryTime in GetTrailStatus after StartLogging
The sdk-test-java compatibility test asserts latestDeliveryTime() is
non-null immediately after startLogging. Seed it with the startLoggingTime
so the field is always present once logging has been started.
* fix(cloudtrail): emit SnsTopicARN alongside SnsTopicName in CreateTrail/UpdateTrail responses
Accept both SnsTopicARN and SnsTopicName on input (SnsTopicARN takes
precedence). Emit both fields on output so clients reading the current
field name (SnsTopicARN) get a non-null value.
* fix(cloudtrail): wildcard S3 ARN matching, trail name validation, LookupEvents
- matchesS3DataResourceArn: handle bare "arn:aws:s3", "arn:aws:s3:::*", and
"arn:aws:s3:::*/*" wildcard forms so trails configured via the AWS Console
"capture everything" selector actually record events (previously fell through
silently). Unit tests added to CloudTrailSelectorMatchingTest.
- createTrail: enforce AWS trail name rules (3–128 chars, start/end with letter
or digit, only letters/numbers/./_/-). Integration tests in new
CloudTrailNameValidationTest.
- CloudTrailJsonHandler: add LookupEvents stub returning an empty Events array,
matching upstream's addition in #1603.
* fix(cloudtrail): log empty catches, key selectors/logging by trail home region
- CloudTrailLogWriter.stop(): log at WARN instead of silently swallowing the
final-flush exception (AGENTS.md: never leave a catch block empty).
- CloudTrailService.putEventSelectors / getEventSelectors / startLogging /
stopLogging / getTrailStatus: use trail.homeRegion() as the storage key
instead of the request region. Previously a cross-region call (e.g. accessing
a trail by ARN from a different-region endpoint) stored selectors and logging
state in the wrong region's map, so trailsMatching() found an empty selector
list and logging never fired.
- S3Controller.emitCloudTrailEvent / IamEnforcementFilter.emitS3DenialIfApplicable:
replace empty inner catch blocks with LOG.tracev() so unexpected failures
during request-context extraction surface at trace level.
* fix(iam): distinguish bucket-level vs object-level ?acl / ?tagging IAM actions
resolveS3SubResourceAction was always mapping ?acl and ?tagging to object-level
actions (s3:PutObjectAcl, s3:GetObjectAcl, etc.) regardless of path depth.
A PUT /{bucket}?acl request requires s3:PutBucketAcl, not s3:PutObjectAcl —
callers with the correct bucket-level permission were incorrectly denied.
Fix: inspect the URL path after stripping the leading slash. When there is no
slash (or the path ends with one), the target is a bucket; otherwise it is an
object. Applies to all six variants: GetBucketAcl, PutBucketAcl,
GetBucketTagging, PutBucketTagging, DeleteBucketTagging (and their object
counterparts).
* fix(cloudtrail): re-queue records on flush failure instead of dropping them
drainPendingRecords atomically dequeues all records before the S3 write.
If serializeAndGzip or s3Service.putObject threw, those records were gone —
permanently lost before the re-throw reached flushAll.
Fix: wrap the serialize+write block in a try-catch that calls requeueRecords
before rethrowing. Records are added back to the tail of the queue and will be
retried on the next flush cycle. The new CloudTrailService.requeueRecords helper
also makes the re-queue path unit-testable independently of flushTrail.
* fix(s3): emit GetObjectAcl error record under correct event name
getObjectAcl was called inside the outer GET-object try block. On any
AwsException (NoSuchKey, AccessDenied, etc.) the catch at the bottom fired
and emitted a GetObject error record. CloudTrail consumers auditing ACL
errors would see the wrong event name.
Wrap the acl branch in its own try-catch that emits GetObjectAcl on both
success and failure paths, mirroring the pattern used by the other hooked ops.
* ci: retrigger
* fix(test): pass CloudTrailService and CurrentVertxRequest to IamEnforcementFilter constructor
* fix(cloudtrail): persist trail state via StorageFactory instead of volatile in-memory maps
* fix(cloudtrail): address review feedback on region, name lookup, and ACL detection
- S3Controller: use request region (from credential scope) instead of
getDefaultRegion() for CloudTrail event emission, matching the IAM
denial hook behaviour so allowed and denied calls land in the same trail.
- CloudTrailService.findTrail: name lookup now uses regionKey(region, name)
directly; ARNs still do a cross-region scan. Prevents two same-name
single-region trails from resolving ambiguously by map iteration order.
- TrailKey: add eventRegion field so multi-region trail events are written
to the correct S3 delivery path (CloudTrail/<eventRegion>/) rather than
always the trail home region. drainPendingRecords/requeueRecords now take
a TrailKey to carry all three dimensions.
- IamActionRegistry: fix isBucketLevel — trailing slash is a valid S3 key
character, so /bucket/folder/?acl is an object ACL request. Replaced the
endsWith("/") check with an index-based test. Add IamActionRegistryTest
cases for the folder/ regression.
* docs(cloudtrail): sync action table order with make docs-sync
|
||
|
|
97b64a1d3b |
feat: add AWS Lightsail emulation (#1583)
* feat(lightsail): add AWS Lightsail emulation * fix(lightsail): align error responses with AWS * fix(lightsail): address review edge cases * fix(lightsail): reject attached disk reattach * fix(lightsail): reject static ip reattach * fix: register lightsail docs handler |
||
|
|
326b495496 |
feat(iot) Feature/issue 1038 iot core (#1359)
* feat: add IoT endpoint and thing registry * feat: add IoT thing tagging * feat: add IoT certificates and shadows * feat: add IoT MQTT broker * feat: upgrade IoT MQTT broker to Moquette 0.18 * feat: restore IoT reserved MQTT topics * feat: add IoT topic rules engine * feat: improve IoT thing registry compatibility * feat: complete IoT MVP 1 compatibility * feat: complete IoT MVP 2 compatibility * feat: finish IoT MVP 2 coverage * fix: disable IoT MQTT broker persistence * fix(docker): include vendored Maven artifacts in source builds * fix(iot): stabilize MQTT integration test sockets * fix(iot): verify MQTT test connections * fix(iot): use Paho for MQTT integration tests * fix(iot): use Vert.x MQTT broker --------- Co-authored-by: nathan <nathan@debian-dev-small.localdomain> |
||
|
|
efacb37130 |
feat: Adds initial Elastic Beanstalk Query API support to Floci. (#1362)
* feat: add Elastic Beanstalk query API support feat: add Elastic Beanstalk query API support * fix(elasticbeanstalk): configure native-image runtime initialization * fix(elasticbeanstalk): align missing parameter errors and add application ARN * test(elasticbeanstalk): add Java SDK compatibility coverage |
||
|
|
3f314dcb4e |
feat(codepipeline): add AWS CodePipeline emulation (#1469)
* feat(codepipeline): add AWS CodePipeline emulation * fix(codepipeline): align webhook and rollback response shapes |
||
|
|
fd904bc409 |
feat(memorydb): add MemoryDB service with mock mode (#1420)
* feat(memorydb): add MemoryDB service with mock mode Adds Amazon MemoryDB for Redis as a Docker-backed service, modelled on the existing ElastiCache and DocumentDB services. Control plane is AWS JSON 1.1 (X-Amz-Target: AmazonMemoryDB.*) dispatched from AwsJson11Controller, supporting CreateCluster, DescribeClusters, UpdateCluster, DeleteCluster, ListTags, TagResource and UntagResource. The data plane reuses ElastiCache's RESP proxy and SigV4 validator, since MemoryDB is Redis wire-compatible: each cluster starts a real Valkey/Redis container and an auth proxy forwards client connections to it. A mock mode (FLOCI_SERVICES_MEMORYDB_MOCK, default false) tracks clusters as control-plane-only resources without starting a container, so IaC tools like Terraform and OpenTofu can run where no Docker socket is available. This mirrors the existing DocumentDB mock flag. Includes service unit tests and documentation. * fix(memorydb): return UnknownOperationException for unsupported actions Unrecognised JSON 1.1 actions returned InvalidParameterValueException, which mis-signals the error category and can break SDK/CLI probing. Use UnknownOperationException to match CloudMap and the shared JsonErrorResponseUtils.createUnknownOperationErrorResponse helper. * docs(memorydb): drop service-count bump from this PR The 55->56 edit was built on a stale baseline (main's count does not reflect already-merged services) and conflicts with a separate docs branch. Keep the MemoryDB matrix row; leave the headline count to a dedicated docs PR. No functional change. * fix(memorydb): use InternalFailure for unexpected errors Align the generic exception path with Floci's JSON 1.1 convention and the shared JsonErrorResponseUtils.createErrorResponse helper, which emit InternalFailure for unexpected server errors. SDKs commonly key on this. * fix(memorydb): copy AuthToken onto cluster spec on CreateCluster CreateCluster resolved AuthMode.PASSWORD from the presence of AuthToken but never copied the token onto the spec, so the service stored a null token and password auth always failed. Copy AuthToken onto the spec and add MemoryDbHandlerTest covering token propagation and the NO_AUTH default. * fix(memorydb): validate cluster name to avoid NPE on null key getCluster passed the name straight to the ConcurrentHashMap-backed storage, so a null/blank name (reachable via UpdateCluster/DeleteCluster without ClusterName) threw a NullPointerException surfaced as a 500. Guard with an AWS-style InvalidParameterValueException (400), matching CreateCluster, and add a regression test. * fix(memorydb): roll back proxy port and container on failed provisioning If container or proxy startup failed after allocating a proxy port, the port stayed reserved (and any started container orphaned), eventually exhausting the range with InsufficientClusterCapacity. Extract backend startup into startBackend with best-effort rollback that stops the proxy and container and always releases the port. Add a regression test proving the port is reclaimed after a failed create. * fix(memorydb): stop proxies and containers on emulator shutdown MemoryDbProxyManager.stopAll and MemoryDbContainerManager.stopAll were never invoked from EmulatorLifecycle.onStop, so MemoryDB clusters left bound TCP proxy ports and running containers after shutdown. Wire both managers into onStop alongside the existing ElastiCache and RDS cleanup. No test: shutdown DI wiring is not meaningfully testable in isolation. * test(memorydb): update EmulatorLifecycleTest for new constructor params The shutdown-wiring change added MemoryDb container/proxy managers to the EmulatorLifecycle constructor; update the direct constructor call in the unit test to pass the two new mocks. * test(memorydb): add Docker-backed integration test End-to-end coverage mirroring ElastiCacheIntegrationTest: JSON 1.1 control plane (CreateCluster/DescribeClusters/DeleteCluster) plus the real RESP data plane through a Valkey container and the auth proxy. Covers no-auth connectivity (PING/SET/GET), password auth (AUTH token accepted, wrong token and unauthenticated commands rejected), and proxy-port reuse after delete. Gated on Docker availability via an assumption. * docs(memorydb): clarify mock endpoint uses configured hostname Mock mode reports <hostname>:6379 (from floci.hostname / FLOCI_HOSTNAME, defaulting to localhost), not always localhost. Update the Mock Mode note so users with a custom hostname aren't surprised. * fix(memorydb): use correct InsufficientClusterCapacityFault error code |
||
|
|
d77f11abbb |
docs(docdb): document DocumentDB service (#1386)
* docs(docdb): document DocumentDB service * docs(docdb): clarify data endpoint port is from DescribeDBClusters * docs: align AWS service count to 56 across docs and README --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> Co-authored-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
717769857b |
docs: correct service count to 58 and add EMR, WAF v2, CloudTrail pages (#1398)
Reconcile inconsistent service counts (55/54/41) to 58 distinct services across the README, docs index, services overview, and the LocalStack migration guide. Add the missing per-service pages and Service Matrix rows for EMR, WAF v2, and CloudTrail, and wire them into the mkdocs nav and README service tables. |
||
|
|
022436eaae | feat(batch): add AWS Batch service support (#1332) | ||
|
|
e063ac18ee |
feat(rds-data): add RDS Data API support (#1262)
* feat(rds-data): add RDS Data API support * fix(rds-data): harden Data API validation * fix(rds-data): harden review findings |
||
|
|
446697ec71 |
docs: add AWS Cloud Map service docs, fix service count, add analytics (#1221)
Document AWS Cloud Map (servicediscovery), which was implemented but never documented, and reconcile related documentation drift: - Add docs/services/cloudmap.md covering all 22 operations, config, examples - Bump headline service count from 52 to 53 across README and docs - Add Cloud Map to the canonical service matrix, README tables, and docs index - Backfill mkdocs nav with Cloud Map and 7 existing-but-unlisted service docs - Backfill condensed tables with services missing from them (Transcribe, Resource Groups Tagging, Neptune, EventBridge Pipes, CloudFront) - Add Umami analytics tracking via a Material theme override (overrides/main.html) |
||
|
|
c8b0048bac |
docs(appsync): add AppSync service documentation (#1149)
Add documentation for AWS AppSync Management API (Phase 1) covering 33 operations across GraphQL API, Schema, DataSources, Resolvers, Functions, Types, API Keys, Tags, and Environment Variables. Includes pagination, cascade delete behavior, CLI examples, and service matrix entry. |
||
|
|
59befa3077 |
docs: add light/dark logo branding, mkdocs theming, and README badges (#1150)
Replicate the floci-gcp light/dark logo treatment with AWS orange dots, add mkdocs branding/theming with header and logo assets, and add shields.io badges to the README (release, build, docker, license, stars). |
||
|
|
a0a30a26f8 |
docs: add Neptune service page and fix missing index entries (#950, #951) (#1056)
- Create docs/services/neptune.md: 8 supported actions, configuration table (proxy ports, Docker image, network), Docker Compose snippet, AWS CLI + gremlin-python + boto3 examples, and Out of Scope section - Add Neptune to mkdocs.yml nav (after Glue) - Add Neptune row to docs/services/index.md service matrix - Add missing EventBridge Pipes row to docs/services/index.md |
||
|
|
be01ee0747 | docs(pipes): add documentation and navigation for EventBridge Pipes (#1001) | ||
|
|
fa31be9cf9 | docs: add resource groups tagging service docs (#976) | ||
|
|
b200280a83 |
feat(cloudfront): implement CloudFront service emulation (#969)
* feat(cloudfront): implement CloudFront service emulation Adds full CloudFront emulation covering both core and extended operations using the REST XML protocol (2020-05-31 API). Core resources: - Distributions (CRUDL, copy, enable/disable, ETag concurrency) - Cache Behaviors (default + ordered) - Invalidations (create, get, list) - Origin Access Controls and Origin Access Identities - CloudFront Functions (create, update, publish, test, describe) Extended resources: - Continuous Deployment Policies - Public Keys and Key Groups - Realtime Log Configs (non-standard POST-based get/delete) - Streaming Distributions (legacy RTMP, enforces disabled before delete) - Field-Level Encryption Configs and Profiles - Monitoring Subscriptions Infrastructure: - Registers CloudFrontController in ResolvedServiceCatalog as REST_XML - Adds CloudFrontServiceConfig and CloudFrontStorageConfig to EmulatorConfig - Adds CLOUDFRONT namespace constant to AwsNamespaces - Registers CloudFrontService for GraalVM runtime initialization to avoid SecureRandom heap-baking in native builds - Wires storage through StorageFactory with per-resource JSON files - Adds cloudfront.md documentation page * docs: revert docker-compose.yml |
||
|
|
9e35046647 |
Docs/enviroment instead yml (#764)
* docs: moving all config to env instead of yml * docs: sync with main and new features * docs: reverting docker-compose.yml |
||
|
|
5befe8b619 |
feat: optional TLS/HTTPS support with self-signed certificate generation (#754)
* feat: optional TLS/HTTPS support with self-signed certificate generation - Add TlsConfigSource (MicroProfile ConfigSource SPI) that injects Quarkus TLS properties before the HTTP server starts - Auto-generate self-signed certificates with correct SANs including custom hostnames from FLOCI_HOSTNAME and FLOCI_BASE_URL - Persist certificate metadata for change detection across restarts - Fix CertificateGenerator to encode IP addresses as iPAddress SANs (RFC 5280) - Serve HTTP + HTTPS simultaneously (LocalStack parity) - Support user-provided certificates via FLOCI_TLS_CERT_PATH/KEY_PATH - Add TLS configuration documentation - Add Node.js SDK compatibility test for HTTPS connectivity - Add comprehensive unit and integration tests (79 test cases) Closes #711 * feat(tls): add TLS proxy server and WebSocket-over-TLS tests - Add TlsProxyServer: TCP proxy on port 4566 that detects TLS ClientHello and routes to HTTPS (4511) or HTTP (4510) backend accordingly - Add apigatewayv2-websocket-tls.test.ts: WSS compatibility tests covering connect/disconnect, route selection, broadcast, authorization, @connections API, binary frames, and payload size limits - Update CI workflow to enable FLOCI_TLS_ENABLED=true for compat tests - Update sdk-test-node Dockerfile with NODE_TLS_REJECT_UNAUTHORIZED=0 - Update tls.test.ts for HTTPS SDK client tests - Update README with WebSocket-over-TLS test documentation * fix(tls): address review comments — LocalStack parity and floci.io SANs - Add USE_SSL and CUSTOM_SSL_CERT_PATH mappings to localstack-parity.sh - Add localhost.floci.io and *.localhost.floci.io to default certificate SANs - Update affected tests and documentation --------- Co-authored-by: Dixit R Jain <dixitrjain@Mac-379.lan> Co-authored-by: Dixit R Jain <dixitrjain@Mac.lan> |
||
|
|
c444da222c | Release 1.5.13 | ||
|
|
023880b7d9 |
feat(parity): LocalStack drop-in compatibility (#696)
- Translate LocalStack env vars (LOCALSTACK_HOST, PERSISTENCE, LAMBDA_DOCKER_NETWORK, etc.)
to Floci equivalents automatically at startup; opt out with LOCALSTACK_PARITY=false
- Serve /_localstack/init and /_localstack/health alongside /_floci/* equivalents
- Report executed scripts with path, state, and return_code in /_floci/init response
- Add /_aws/sqs/messages GET (non-destructive peek) and DELETE (purge) inspection endpoint
- Add /_aws/execute-api/{apiId}/{stageName} LocalStack-compat path for REST API invocation
- Add four-phase init hook lifecycle (boot/start/ready/stop) with dual-path discovery
(/etc/floci/init/ and /etc/localstack/init/ compat paths)
- Install Python 3, AWS CLI, boto3 in standard image; wrap aws binary to pre-configure
--endpoint-url=http://localhost:4566 so init scripts need no extra flags
- Wire entrypoint.sh + gosu privilege drop into all Dockerfile variants
- Add migration guide and update README, docker-compose, docker-images, SQS, and
initialization-hooks docs
|
||
|
|
3c98efe615 |
chore: new docker image tag and compatibility (#691)
* chore: new docker image tag and compatibility * chore: change nightly workflow schedule time |
||
|
|
5b0ebb89a4 | docs: adding testcontainers documentation (#680) | ||
|
|
16fc5c9691 | docs: updating documentation logo | ||
|
|
63ed81c59d |
feat(eks): implement EKS service with real k3s data plane support (#493)
* feat(eks): implement EKS service with real k3s data plane support * fix: adjusting eks volume issues |
||
|
|
c565398beb |
feat(bedrock-runtime): stub Converse and InvokeModel for #87 (#486)
Adds a bedrock-runtime service stub so AWS SDK and CLI clients can target
Floci for local development of Bedrock Runtime callers. Dummy responses
only: no real model inference.
- Register bedrock-runtime in ResolvedServiceCatalog under both "bedrock"
and "bedrock-runtime" credential scopes (boto3 signs with signingName
"bedrock" while some clients use the endpoint id)
- POST /model/{modelId}/converse returns a fixed assistant message plus
synthetic usage and latency metrics matching the AWS Converse contract
- POST /model/{modelId}/invoke returns an Anthropic-shaped body for
anthropic.* and *.anthropic.* model ids, generic {"outputs": [...]}
otherwise. Request body is passed through as opaque bytes
- {modelId:.+} path regex accepts full ARNs (inference profiles,
provisioned throughput) in addition to plain ids
- converse-stream and invoke-with-response-stream return 501 so SDKs
get a clear error instead of 404
- Response building uses JsonNode rather than typed POJOs, avoiding
native-image reflection registration
13 new integration tests (Converse + InvokeModel happy paths, validation,
inference-profile ids and ARNs, 501 streaming responses). Full suite
remains green: 2263 tests, 0 failures.
|
||
|
|
ea597c67d6 |
feat: implement local Data Lake stack (Athena, Glue, and Firehose) (#429)
* feat: implement local Data Lake stack (Athena, Glue, and Firehose) * fix: adding athena, firehose and glue documentation * fix: updating dataLateTest |
||
|
|
91071aaae7 |
feat: implement Amazon MSK service with Redpanda orchestration (#419)
* feat: implement Amazon MSK service with Redpanda orchestration * fix: adding missing msk service on the test |
||
|
|
788ccc8404 |
fix(ecr,s3): fix CDK compatibility and resolve macOS ECR port conflict (#354)
* fix(ecr,s3): fix CDK compatibility and resolve macOS ECR port conflict * fix: remove go.mod |
||
|
|
a32b7f1f3b |
docs: comprehensive audit sweep + CHANGELOG backfill (1.1.0-1.5.2) (#326)
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs had drifted from code behaviour. This sweep reconciles docs against the current codebase on upstream/main. - Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history - Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58), Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the actual dispatch handlers rather than @Path annotation counts. - Rewrite README "Supported Services" table to drop per-service op counts (they drift too fast); point readers at docs/services/index.md - Update 24 service docs for accuracy, add "Not Implemented" sections where relevant (s3.md, lambda.md, api-gateway.md) - Refresh configuration and getting-started docs - Add EventBridge Scheduler and AppConfig to mkdocs nav - Add AppConfig / AppConfigData rows to README and services index following the 1.5.2 upstream release |
||
|
|
2859d257b5 |
feat(ec2): add EC2 service with 61 operations, integration tests, and docs (#213)
* feat(ec2): adding ec2 service * feat(ec2): add EC2 service with 61 operations, integration tests, and docs |
||
|
|
766d031b76 |
docs: migrate docs GitHub references to floci-io (#214)
* docs: migrate docs GitHub references to floci-io * docs: update MkDocs site and repo metadata to floci-io * docs: update MkDocs site_url and repository references to floci-io |
||
|
|
07a7a97b47 |
feat(ecs): adding ecs service (#209)
* feat(ecs): adding ecs service * feat(ecs): adding ecs service |
||
|
|
fe2480e596 |
docs: add SES documentation (#181)
* docs: introduce SES (Simple Email Service) documentation * docs: integrate SES into service lists and navigation |
||
|
|
1e2950a3aa |
docs: improve initialization hooks documentation (#144)
* docs: add initialization hooks to navigation * docs: improve link label for initialization hooks * docs: expand initialization hooks documentation with examples |
||
|
|
68b8ed883a | feat: add opensearch service emulation (#85) (#132) | ||
|
|
286bef9dd7 | fix: update git pages config for the docs | ||
|
|
61433f59ab | firt commit |