* feat(ses): add v2 TagResource / UntagResource / ListTagsForResource
Implements the v2 SES tag endpoints at /v2/email/tags. Initial scope
covers ConfigurationSet ARNs only
(arn:aws:ses:<region>:<account>:configuration-set/<name>); other
resource types return NotFoundException so follow-up PRs can extend
coverage to Identity, EmailTemplate, etc.
Behavior aligned with observed AWS responses:
- TagResource enforces ARN/signing region match strictly and rejects
mismatches with BadRequestException ("Failed to tag resource").
- UntagResource and ListTagsForResource route lookups to the ARN's
region instead, so a region mismatch surfaces as NotFoundException
with the resource-specific message (e.g. "No ConfigurationSet
present with name: <name>").
- TagResource merges by key (existing keys are replaced, others
retained); UntagResource silently skips keys not present.
- Empty Tags / TagKeys lists are rejected with BadRequestException to
match AWS validation.
- ARN parsing uses the shared AwsArnUtils helper; missing region or
account in the ARN is rejected as BadRequest, matching AWS.
Tests:
- New SesTagsV2IntegrationTest for endpoint-focused coverage (lifecycle,
region-mismatch asymmetry, validation errors).
- Cross-feature round-trip in SesConfigurationSetV2IntegrationTest
verifying that tags supplied to CreateConfigurationSet are reachable
via ListTagsForResource.
- New SesTagResourceTest in the Java SDK compatibility suite.
* refactor(ses): drop unused region parameter from list/untag tag service methods
listResourceTags and untagResource route lookups by the ARN's region, so
the request signing region they accepted was never read. Remove it and
stop resolving it in the controller. tagResource still takes region
because it strictly validates it against the ARN.
* feat: implement API Gateway v2 WebSocket data-plane support Implement full WebSocket data-plane for API Gateway v2, including: - Real WebSocket connection handling via Vert.x (ws://localhost:4566/ws/{apiId}/{stage}) - $connect/$disconnect/$default route lifecycle with Lambda integration - Custom route selection via routeSelectionExpression ($request.body.{field}) - @connections management API (POST/GET/DELETE) for server-to-client messaging - Lambda REQUEST authorizer support on $connect with identity source validation - Stage variable substitution in integration URIs - Multiple integration types: AWS_PROXY, AWS (VTL), HTTP_PROXY, HTTP (VTL), MOCK - Route response selection expression for bidirectional messaging - Binary frame support (isBase64Encoded: true) - 128 KB payload size limit enforcement (frames and @connections POST) - 10-minute idle timeout and 2-hour max connection duration - GoneException (410) for disconnected connections - $connect response headers propagation - Server-initiated close via @connections DELETE (skips $disconnect Lambda) Also includes: - Refactored LambdaArnUtils.extractFunctionNameFromUri as shared utility - Extended Authorizer/Integration/Stage models with new fields - Comprehensive Java integration tests (WebSocket lifecycle, routing, auth, etc.) - Node.js SDK compatibility tests using ws client and @aws-sdk/client-apigatewaymanagementapi - Updated documentation with full feature matrix
* test(apigatewayv2): support custom WebSocket endpoint via env var
- Update wsUrl helper to read FLOCI_ENDPOINT environment variable
- Convert http/https schemes to ws/wss for WebSocket compatibility
- Strip trailing slashes from endpoint URL for consistent formatting
- Enable testing against non-localhost endpoints for CI/CD flexibility
* fix: use AwsErrorResponse for @connections API error responses
Replace raw JSON string literals in handlePostToConnection,
handleGetConnectionInfo, and handleDeleteConnection with the
project-standard AwsErrorResponse record, which serialises to
the correct {"__type": ..., "message": ...} wire shape.
* fix: simplify extractFunctionNameFromUri using AwsArnUtils.parse
Adopt AwsArnUtils.parse() as the core of the implementation per
reviewer suggestion. One addition beyond the suggested snippet:
the API Gateway v1 integration URI format embeds a Lambda ARN
inside an apigateway ARN (resource starts with 'path/.../functions/'),
so we detect that pattern and recurse on the embedded ARN before
applying the standard function-name extraction. All 43
LambdaArnUtilsTest cases pass, including the API Gateway v1 style URI.
Replace the FLOCI_STORAGE_HOST_PERSISTENT_PATH footgun with automatic
named Docker volume management for RDS, OpenSearch, MSK, and ECR.
- Each resource gets a collision-free 6-char hex volumeId generated once
at creation and stored in the model. Container and volume names both use
it: floci-{service}-{volumeId}
- Volumes are labelled floci=true for easy pruning
- Memory mode always removes volumes on resource delete. Persistent modes
retain by default; set prune-volumes-on-delete: true to remove on delete
- Mode detection: FLOCI_STORAGE_HOST_PERSISTENT_PATH set to an absolute
path → host bind-mount mode (legacy); unset or non-absolute → named-
volume mode. Volume names in host-persistent-path are not supported
- Removed the container-storage config key — no longer needed
- Updated docker-compose.yml, and all docs
* feat(textract): add Textract service support and integration tests
* chore(textract): Implement PR suggestions
* fix(textract): remove completed async jobs to prevent memory growth
Implements the v1 Query action mirroring the existing v2
PUT /v2/email/account/sending endpoint. The Enabled parameter is
optional per AWS docs; missing or empty is treated as false.
Adds integration tests and a Java SDK compatibility test that
exercises both v1 UpdateAccountSendingEnabled and verifies state
is shared with the v2 GetAccount / PutAccountSendingAttributes path.
Implements Phase 1 of the Transfer Family JSON 1.1 handler covering
17 operations across server lifecycle, user management, SSH key
management, and tagging.
* feat(route53): add Route53 management-plane emulation
Implements Route53 Phase 1 with 17 operations: hosted zones (Create,
Get, Delete, List, ListByName, Count), resource record sets
(ChangeResourceRecordSets, List), change tracking (GetChange), health
checks (Create, Get, Delete, List, Update), tagging
(ListTagsForResource, ChangeTagsForResource), and GetAccountLimit.
Auto-creates SOA and NS apex records on zone creation. Rejects deletion
of non-empty zones. All changes return INSYNC immediately. IDs are
returned with path prefixes (/hostedzone/Z…, /change/C…) to satisfy
the SDK Route53IdInterceptor. Nameservers are configurable via
floci.services.route53.default-nameserver[1-4].
Adds OpenTofu and Terraform compatibility tests covering zone creation,
A record, auto-created SOA/NS records, health check, and tag persistence.
* feat(feat): adding missing endpoints
* feat(route53): fix timeout when creating route dns from terraform
* feat(ses): add MAIL FROM domain and identity attribute operations
v1 (Query):
- SetIdentityMailFromDomain / GetIdentityMailFromDomainAttributes
- SetIdentityFeedbackForwardingEnabled
- SetIdentityHeadersInNotificationsEnabled
- GetIdentityNotificationAttributes now reflects the stored
feedbackForwardingEnabled and per-NotificationType
headersInNotificationsEnabled flags instead of hard-coded defaults
v2 (REST JSON):
- PUT /v2/email/identities/{id}/mail-from -> PutEmailIdentityMailFromAttributes
- GetEmailIdentity response surfaces real MailFromAttributes
(MailFromDomain / MailFromDomainStatus / BehaviorOnMxFailure) instead
of the previously hard-coded "" / NOT_STARTED / USE_DEFAULT_VALUE
- v1 PascalCase <-> v2 SCREAMING_SNAKE BehaviorOnMxFailure values are
translated at the controller boundary, with both ends rejecting
unknown enum values
Identity gains mailFromDomain, behaviorOnMxFailure (v1 form),
mailFromDomainStatus, and headersInNotificationsEnabled fields. The
service layer normalizes BehaviorOnMxFailure to the canonical SESv1
enum values (UseDefaultValue / RejectMessage), so storage is
consistent regardless of which protocol wrote it.
Validation (verified against live aws-cli output):
- ForwardingEnabled / Enabled / MailFromDomain are required on the
matching v1 setters; missing values produce InvalidParameterValue
rather than silently being treated as false / null
- An empty-string MailFromDomain remains the documented "clear" path,
distinct from a missing parameter; whitespace-only values are
rejected (only "" or null clear the setting)
- BehaviorOnMxFailure / NotificationType enum violations return the
AWS-canonical "1 validation error detected: Value at '<param>' failed
to satisfy constraint: Member must satisfy enum value set: [...]"
message: ValidationError on v1, BadRequestException on v2
- Unknown identity on v1 setters returns InvalidParameterValue with
the AWS-canonical "Identity <X> does not exist." form (HTTP 400)
- v2 PutEmailIdentityMailFromAttributes follows the same wire mapping:
unknown identity surfaces as BadRequestException (HTTP 400) via
remapV1Exception, with the same "Identity <X> does not exist."
message text. Schema / enum validation runs before the service call
so an unknown enum on a missing identity still surfaces as an enum
error rather than as the identity error
- v2 controller validates that MailFromDomain and BehaviorOnMxFailure
are JSON strings; non-textual values produce BadRequestException
- AwsQueryController.SES_ACTIONS picks up the new v1 actions for the
auth-less fallback dispatch
Tests: 21 v1 integration cases, 9 v2 integration cases, 4 SDK compat
cases (AWS Java SDK 2.42.24).
* fix(ses): align identity-setter missing-identity errors with live AWS
Previously setFeedbackForwardingEnabled threw NotFoundException/404 and
setHeadersInNotificationsEnabled threw a Floci-specific
"Identity <X> does not exist." message. Real AWS verified via
aws-cli returns InvalidParameterValue (HTTP 400) for both, but with
*different* operation-specific message texts:
- SetIdentityFeedbackForwardingEnabled (also v2 PUT /feedback after
remapV1Exception):
Identity X is invalid. Must be a verified email address or domain.
- SetIdentityHeadersInNotificationsEnabled:
Identity X is invalid. It must be a verified email address or domain.
- SetIdentityMailFromDomain (unchanged in this commit):
Identity <X> does not exist.
Update the service-level throws so each setter emits its operation's
exact wire shape. setFeedbackForwardingEnabled now also benefits the
pre-existing v2 PUT /feedback endpoint, which previously surfaced
NotFoundException/404 instead of BadRequestException/400.
Tests:
- v1 unknown-identity coverage for SetIdentityFeedbackForwardingEnabled
(new) and updated message-text assertion for HeadersInNotificationsEnabled
- v2 unknown-identity coverage for PUT /feedback
- SDK compat additions: getIdentityNotificationAttributes round-trip
exercising forwarding/header flags, and v2
PutEmailIdentityMailFromAttributes unknown-identity throwing
BadRequestException
* test(ses): update putFeedbackAttributes_notFound to expect BadRequest
The previous commit changed setFeedbackForwardingEnabled to throw
InvalidParameterValue (HTTP 400) for missing identities to match real
AWS, which propagates through remapV1Exception as BadRequestException
on the v2 PUT /feedback path. The pre-existing
SesV2IntegrationTest.putFeedbackAttributes_notFound still asserted the
old 404 / NotFoundException behavior, so it began failing in CI.
Update the test to expect 400 / BadRequestException, matching the
verified live AWS response.
When FLOCI_SERVICES_LAMBDA_AWS_CONFIG_PATH is set, bind-mount the host
path read-only into Lambda containers at /opt/aws-config and set
AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE env vars so the SDK
discovers credentials regardless of container HOME directory.
When unset, credentials are read from Floci's own environment with a
fallback to test/test/test. Blank values are treated as absent.
Closes#686
* feat(scheduler): support TagResource, UntagResource, ListTagsForResource
Implements the three remaining EventBridge Scheduler tag APIs by
extending the shared /tags/{arn} dispatcher. Tags apply to schedule
groups only, matching AWS behavior; ARNs pointing at individual
schedules return ValidationException.
A survey of all ~75 AWS services that share the /tags/{arn} path
shows three independent shape axes — body key (`tags` lower vs
`Tags` capital), body structure (map vs list of {Key, Value}), and
untag query parameter name (`tagKeys` vs `TagKeys`) — and most
"capital Tags" services still use lowercase tagKeys query, so these
axes vary independently. TagHandler exposes them as five orthogonal
default methods rather than a coarse-grained enum:
- tagsBodyKey() defaults to "tags"
- tagsBodyIsList() defaults to false (map)
- tagKeysQueryName() defaults to "tagKeys"
- tagResourceUsesPut() defaults to false (POST)
- strictTagValidation() defaults to false (lenient parsing)
The defaults match the most common AWS shape (~73 services use
lowercase tags map + POST + lowercase tagKeys) so handlers like
EKS, Pipes, and AppConfig need no overrides. The dispatcher
returns 405 MethodNotAllowedException for the unused HTTP method
per handler. Strict input validation (missing Tags, wrong-shaped
Tags, missing TagKeys, entries missing Key or Value) is enforced
when strictTagValidation() is true, mirroring the AWS Scheduler
error shape; lenient handlers retain the looser parsing they had
before.
SchedulerTagHandler overrides tagsBodyKey, tagsBodyIsList,
tagKeysQueryName, and strictTagValidation. ApiGatewayTagHandler
overrides tagResourceUsesPut to true. AppConfigIntegrationTest
switches its tagApplication call from PUT to POST to match the
AWS spec for AppConfig (was relying on the dispatcher's prior
leniency on HTTP method).
* fix(tags): normalize empty body and reject non-object payloads
Address Copilot review on floci-io/floci#700.
- doTagResource normalizes null/blank request bodies to "{}" before
passing to ObjectMapper.readTree, mirroring SchedulerController's
parseTags. Previously an empty body raised a Jackson parse error
that strict handlers surfaced as a ValidationException with a raw
Java/Jackson message instead of the structured AWS error shape.
- parseTags adds a strict-only check that the JSON root is an
object. A request body like a JSON array or string used to fall
through to "Value null at 'Tags' ..." which misleads about the
actual problem; it now reports that the payload itself must be a
JSON object.
SchedulerIntegrationTest covers both paths with a 400 assertion.
- 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
* feat(glue): add Glue Schema Registry support
* Move Glue SDK coverage to compatibility tests
* Align protobuf compatibility expectations
* Resolve services index merge conflict
* Remove unused Lombok compatibility dependency
* Serialize Glue schema registry timestamps as strings
* Tighten Glue schema registry name validation
* Avoid duplicate schema registry index rebuild
* Limit schema registry in-memory constructor visibility
* Clone Glue tables before resolving schema references
* Align Glue schema registry response shapes
* Extract Glue schema version resolver helper
Both validateSchemaReference and withResolvedSchemaReference duplicated
the latest-version computation and the four-argument getSchemaVersion
call. Pull that into a private resolveSchemaVersion(SchemaReference)
helper so the call sites read at one level of abstraction and a future
change to the resolution rule lands in one place.
* Fix Glue schema version list projection
---------
Signed-off-by: Tristan Burch <tburch@users.noreply.github.com>
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
* feat(ses): add TestRenderTemplate (v1) and TestRenderEmailTemplate (v2)
Render a stored SES template against caller-supplied data and return the
resulting MIME message. v1 is dispatched via the Query protocol; v2 is
exposed at POST /v2/email/templates/{name}/render.
Template variable substitution is now strict: a missing attribute in the
rendering data raises MissingRenderingAttribute (mapped to BadRequestException
on v2), matching AWS / moto / LocalStack semantics. Invalid TemplateData
JSON raises InvalidRenderingParameter; non-object TemplateData is rejected
with operation-appropriate errors on the send paths (InvalidParameterValue
on v1, BadRequestException on v2).
The rendered output is a hand-rolled multipart/alternative MIME with a
Date header (UTC), Subject header, and text/plain + text/html parts.
Transfer encoding is auto-selected (7bit for ASCII bodies, 8bit for UTF-8)
matching moto's encode_7or8bit. Body line endings are normalized to CRLF.
Subject control characters and XML 1.0 invalid characters in the rendered
output are stripped to keep the response parseable by SDK clients.
Bulk per-entry rendering errors (MissingRenderingAttribute /
InvalidRenderingParameter raised at apply time) surface as INVALID_PARAMETER
in BulkEmailEntryResults rather than generic FAILED.
No new dependencies are introduced.
* test(ses): consolidate new SesServiceTemplateTest cases via @ParameterizedTest
Group 23 of the new unit tests added in this PR into 6
@ParameterizedTest methods driven by MethodSource data sets:
- pickTransferEncoding (ascii vs non-ascii) -> 1 test, 4 cases
- parseRenderingData invalid inputs -> 1 test, 5 cases
- normalizeToCrlf line-ending variants -> 1 test, 4 cases
- mapErrorCodeToBulkStatus -> 1 test, 4 cases
- sanitizeSubject control / DEL / Unicode preservation -> 1 test,
6 cases (null-input case kept separate)
- stripXml10InvalidChars C0 / noncharacters / surrogates -> 1 test,
11 cases
Coverage is preserved (every input that was exercised before is still
exercised; surfacing each case as an individual test makes the run
report show 58 cases instead of 49 for this file). The remaining
tests -- buildTestRenderMime structure assertions and the original
applyTemplateData edge cases -- stay as individual @Test methods
because they have distinct multi-step assertions.
* test(ses): address upstream Copilot style nits
- Remove unused containsString static import in
SesTestRenderV2IntegrationTest after the parameterized refactor
- Replace assertEquals(true/false, ...) with assertTrue/assertFalse in
SesServiceTemplateTest for clearer intent and better failure output
* feat(elbv2,codedeploy): real ALB Vert.x proxy and ECS blue/green deployment
ELB v2 Phase 2: replace the mock ALB with a real Vert.x HTTP reverse proxy.
ElbV2DataPlane compiles listener rules into an atomic rule chain and proxies
requests to target group members. ElbV2HealthChecker runs periodic health
checks against registered targets. shiftListenerForward atomically rewrites
the default forward rule (simple or weighted) for CodeDeploy traffic shifts.
CodeDeploy Phase 3: implement full ECS blue/green deployment. CreateDeployment
drives the complete lifecycle — green task set creation, BeforeInstall /
AfterInstall / BeforeAllowTraffic hooks, ALB listener traffic shift (AllAtOnce,
Canary, or Linear), AfterAllowTraffic hook, green task set promoted to PRIMARY,
blue task set deleted. Compute platform is resolved from the Application when
the deployment group doesn't carry it, matching real AWS SDK behavior.
* fix: refactor to use arnUtils
* feat(codebuild,codedeploy): real build execution and Lambda deployment engine
CodeBuild Phase 2: runs buildspec phases inside real Docker containers.
Source injected via docker cp (copyArchiveToContainerCmd); artifacts
extracted via docker cp (copyArchiveFromContainerCmd). No bind mounts —
works transparently in Docker-in-Docker. CloudWatch log streaming, S3
artifact upload, StopBuild, RetryBuild, ListBuilds, ListBuildsForProject.
CodeDeploy Phase 2: real Lambda deployments with traffic shifting via
alias RoutingConfig, lifecycle hook invocation against live Lambda
functions, PutLifecycleEventHookExecutionStatus callback, and
auto-rollback on hook failure. CreateDeployment, GetDeployment,
deployment state polling, ListDeployments, BatchGetDeployments,
ListDeploymentTargets, BatchGetDeploymentTargets.
* docs: updating docs with new services details
* feat(ses): add SendBulkEmail (v2) and SendBulkTemplatedEmail (v1)
Adds bulk templated email support for both the SES v1 Query API
(SendBulkTemplatedEmail) and the SES v2 REST JSON API
(POST /v2/email/outbound-bulk-emails). The two endpoints share a
single SesService.sendBulkTemplatedEmail method that resolves the
template upfront, merges DefaultTemplateData with each entry's
ReplacementTemplateData at the JSON-key level (replacement wins),
renders subject/text/html via the existing applyTemplateData helper,
and reuses sendEmail per destination so each successful entry appears
in the existing /_aws/ses inspection mailbox with a unique MessageId.
Per-entry results are returned in the BulkEmailEntryResult shape with
status mapped to the AWS wire format expected by each protocol
(CamelCase for v1, SCREAMING_SNAKE for v2). Per-entry AwsException
codes are mapped to the closest BulkEmailEntryResult.Status (e.g.
InvalidParameterValue -> INVALID_PARAMETER, which renders as
"InvalidParameterValue" on v1), falling back to FAILED for unexpected
exceptions.
Template lookup failures and account-sending-paused conditions are
top-level errors on both protocols, with v1 raising
AccountSendingPausedException to match AWS semantics.
* fix(ses): enforce account sending check in v1 SendEmail/SendRawEmail/SendTemplatedEmail
v1 Query SES handlers previously sent mail even when account-level
sending was disabled, while v2 REST JSON handlers and the new
SendBulkTemplatedEmail correctly return AccountSendingPausedException.
Add the same guard at the top of handleSendEmail, handleSendRawEmail,
and handleSendTemplatedEmail to align v1 with v2 and AWS semantics.
* feat(ses): add ConfigurationSet CRUD on v1 Query and v2 REST JSON
Adds Configuration Set name management on both protocols:
- v1 Query: CreateConfigurationSet, DescribeConfigurationSet,
ListConfigurationSets, DeleteConfigurationSet
- v2 REST JSON: POST/GET (single)/GET (list)/DELETE under
/v2/email/configuration-sets[/{name}]
Storage is region-scoped and shared across both protocols, with name as
the primary key. Tags are persisted on v2 create and returned on v2 get;
v1 only round-trips the name (real SES v1 has no tags on configuration
sets). Errors map ConfigurationSetAlreadyExists / ConfigurationSetDoesNotExist
(v1) onto AlreadyExistsException 400 and NotFoundException 404 (v2)
via the existing SesController remap helper.
Field validation (per AWS limits): ConfigurationSetName must match
^[A-Za-z0-9_-]{1,64}$; each Tag Key is 1-128 chars and each Tag Value is
0-256 chars; non-array Tags are rejected with BadRequestException.
Out of scope (future PRs): SendingOptions / EventDestinations /
TrackingOptions / DeliveryOptions / ReputationOptions / SuppressionOptions /
VdmOptions, and ConfigurationSetName validation in the Send* APIs.
* fix(ses): allow Tag without Value on ConfigurationSet create
AWS SDKs commonly omit Tag.Value when only the key matters
(Tag.builder().key("env").build()), serialising the request without a
Value field. Floci was rejecting these calls with "Tag Value is
required", diverging from typical SDK and LocalStack behaviour. Drop
the required-value check; the 0-256 length constraint still applies
when a value is present.
* fix(kms): return false for GetKeyRotationStatus on asymmetric/HMAC keys
AWS updated GetKeyRotationStatus behavior so asymmetric and HMAC keys
return { KeyRotationEnabled: false } instead of UnsupportedOperationException.
EnableKeyRotation and DisableKeyRotation still reject these key types.
* fix(kms): return false for GetKeyRotationStatus on asymmetric/HMAC keys
AWS updated GetKeyRotationStatus behavior so asymmetric and HMAC keys
return { KeyRotationEnabled: false } instead of UnsupportedOperationException.
EnableKeyRotation and DisableKeyRotation still reject these key types.
* feat(lambda): add bind-mount hot-reload mode via S3Bucket=hot-reload
Functions created with S3Bucket=hot-reload and S3Key=/absolute/path
have their host directory bind-mounted into /var/task rather than
packaged as a ZIP. Each invocation runs an ephemeral container so
file changes on disk are picked up immediately without calling
UpdateFunctionCode or re-uploading code.
Feature is disabled by default; opt in with:
FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ENABLED=true
An optional path allowlist (FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ALLOWED_PATHS)
restricts which host directories may be bind-mounted.
* fix: missing hot reload enable env
* feat(lambda): embedded DNS server for virtual-hosted S3 resolution
Lambda containers cannot resolve virtual-hosted S3 URLs
(my-bucket.floci:4566) because Docker DNS has no wildcard support —
queries for *.floci fall through to public DNS and hit real AWS.
Adds a Vert.x UDP/53 DNS server that binds automatically when Floci
runs inside Docker. It resolves any *.{floci.hostname} query to
Floci's container IP and forwards everything else upstream. Lambda
containers receive Floci's IP as their DNS server via HostConfig.withDns().
An optional floci.dns.extra-suffixes config allows LocalStack migrants
to route *.localhost.localstack.cloud without changing Lambda code.
Netty NioDatagramChannel was tried first but silently dropped IPv4
UDP packets due to AF_INET6 socket defaults — Vert.x DatagramSocket
with setIpV6(false) resolves this.
* fix: adding missing dns class
* docs: update Docker image references to floci/floci
* docs: keep README Docker Hub badges pointing to hectorvent/floci
The hectorvent/floci image has accumulated pull and size metrics; switch
the badges to floci/floci once the new image has comparable numbers.
* feat(athena): real SQL execution via floci-duck DuckDB sidecar
- Lazy-start floci/floci-duck:latest on first StartQueryExecution call;
reuse the running container for all subsequent queries
- Inject Glue tables as CREATE OR REPLACE VIEW statements via setup_sql
before the user SQL so DDL runs outside the COPY(...) wrapper
- SerDe-aware format inference: inferReadFunction now checks
SerdeInfo.SerializationLibrary in addition to InputFormat, so standard
AWS JSON tables (TextInputFormat + JsonSerDe) map to read_json_auto
- ImageCacheService: skip Docker Hub pull when image is already present
locally, preventing local builds from being overwritten
- Add AthenaIntegrationTest (5 unit integration tests)
- Add AthenaTest and DataLakeTest SDK compatibility tests
- Update docs: athena.md (full rewrite), glue.md, README, CHANGELOG
* fix: docker image check fix
* feat(ses): implement email template CRUD with stored, inline, and ARN variants
Adds CreateTemplate / GetTemplate / UpdateTemplate /
DeleteTemplate / ListTemplates on both V2 REST JSON
(/v2/email/templates) and V1 Query.
SendEmail / SendTemplatedEmail resolve templates in three forms
with Mustache-style {{var}} substitution against TemplateData:
- TemplateName references a stored template
- TemplateArn extracts the name from the template/<name>
segment of an SES template ARN (region and account segments
are not validated, mirroring how KMS / Secrets Manager
handle ARNs in Floci)
- TemplateContent (V2 only) supplies inline subject / text /
html without storing the template first
V2 Content.Template requires exactly one of TemplateName,
TemplateArn, or TemplateContent; violations return
BadRequestException (400). V1 SendTemplatedEmail accepts
TemplateArn either alone or alongside Template (name) — the
name is used for resolution when both are present, matching
AWS where boto3 and the Java SDK keep Template as a required
field and treat TemplateArn as supplementary for cross-account
addressing.
Templates persist region-scoped via StorageFactory in
ses-templates.json. Template names reject leading/trailing
whitespace (same rule as identities) and are validated through
a single validateTemplateName helper reachable from every
resolution path. listTemplates is sorted by CreatedTimestamp
with TemplateName as a tiebreaker for deterministic output.
Error codes: the service layer throws V1-style codes
(TemplateDoesNotExist / AlreadyExists / InvalidTemplate /
InvalidParameterValue); SesController remaps them to
NotFoundException (404) / AlreadyExistsException (400) /
BadRequestException (400) for V2 callers.
* test(ses): add Python and Java SDK compatibility tests for templates
Covers boto3 (ses / sesv2) and AWS Java SDK v2 (SesClient /
SesV2Client) against the SES email template CRUD, inline
TemplateContent, and TemplateArn paths. Happy path,
duplicate-create rejection, missing-template lookups,
Mustache-style variable substitution, and 3-way selector
conflicts on V2 Content.Template are exercised on both SDK
surfaces.
Adds:
- Python: ses_client / sesv2_client conftest fixtures and a
tests/test_ses_templates.py suite covering V1 + V2
- Java: sesv2 Maven dependency, SesV2Client factory in
TestFixtures, and a SesTemplateTest covering V1 + V2
* docs(ses): document email template CRUD and templated send
Adds the new V1 template actions (CreateTemplate / GetTemplate
/ UpdateTemplate / DeleteTemplate / ListTemplates /
SendTemplatedEmail) and the V2 /v2/email/templates endpoints
to the SES service reference, and extends the README service
matrix to mention template support on the SES / SES v2 rows.
* fix(ses): add template actions to SES_ACTIONS for unsigned request routing
Unsigned clients (curl, aws --no-sign-request) were falling through to
the SQS handler because the six template Query actions were not
registered in SES_ACTIONS.
* fix(ses): narrow exception catch to JsonProcessingException in template endpoints
Broad Exception catch was masking unexpected errors (e.g. NPE) as 400
responses. Narrowed to JsonProcessingException which is the only
checked exception from objectMapper.readTree().
* test(ses): add template variable substitution edge cases and cross-region isolation
Add SesServiceTemplateTest with 14 unit tests for applyTemplateData
covering undefined variables, spaced/hyphenated names, unclosed braces,
non-string JSON values, regex metacharacters, and case sensitivity.
Add cross-region isolation integration test verifying templates created
in one region are not visible in another.
* test(ses): add awscli compatibility tests for template CRUD and templated send
Cover create, get, update, list, delete template and send-templated-email
via the AWS CLI. Uses JSON parameter format to avoid awscli parser issues
with Mustache-style {{variable}} syntax.
---------
Co-authored-by: Kenshin OKINAKA <kenshin_okinaka@realcross.co.jp>
* feat(cognito): add TagResource, UntagResource, ListTagsForResource for user pools
Dispatch the three Cognito IDP tag operations through CognitoJsonHandler and
resolve user pools by parsing the resource ARN (O(1) pool-store lookup, not a
full scan). Malformed ARNs now surface as InvalidParameterException rather
than a swallowed ResourceNotFoundException.
Reject reserved floci:* keys on standalone TagResource via
ReservedTags.rejectReservedTagsOnUpdate, matching the existing strip-on-write
behavior on CreateUserPool / UpdateUserPool. Mutations are synchronized on
the pool instance to match the ensureJwtSigningKeys pattern.
Covered by new unit tests (CognitoServiceTest, CognitoJsonHandlerTest), AWS
CLI bats (cognito.bats), and Java SDK compat tests (CognitoFeaturesTest).
* chore: retrigger CI
Allow KMS CreateKey and Cognito CreateUserPool to accept a reserved floci:override-id tag at creation time so tests can pin deterministic resource IDs without a lookup round trip.
Strip reserved floci:* tags from stored metadata and responses, reject reserved tags on KMS TagResource, wire KMS CloudFormation provisioning through tagged key creation, and add focused unit, handler, integration, and AWS CLI bats coverage for the new behavior.
Adds a background dispatcher that reads persisted schedules and invokes their
targets on time, closing the CRUD-only gap called out in PR #260 and
documented under "Not Yet Supported".
- SchedulerExpressionParser parses at(), rate(), and 6-field cron() with
optional ScheduleExpressionTimezone (default UTC).
- ScheduleInvoker delivers to SQS, Lambda, SNS, and EventBridge PutEvents,
mirroring the EventBridgeInvoker pattern but adapted to Scheduler's Target
model (raw Input string, no JSONPath/template).
- ScheduleDispatcher is a single-threaded ticker that scans every schedule,
gates on State/StartDate/EndDate, fires due schedules, and honours
ActionAfterCompletion=DELETE for one-time at() schedules.
- FlexibleTimeWindow, RetryPolicy and DeadLetterConfig are stored but not
yet honoured; those can be layered on incrementally.
Config (floci.services.scheduler):
- invocation-enabled (default true)
- tick-interval-seconds (default 10)
Unit tests cover the parser (at/rate/cron, timezone, validation) and the
dispatcher (firing, once-semantics, delete-after-completion, state gating,
start/end windows, unsupported expression handling).
Closes#550
* feat(ses): add SMTP relay configuration to EmulatorConfig
Add smtp-host, smtp-port, smtp-user, smtp-pass, and smtp-starttls
settings to SesServiceConfig. smtp-host is Optional — when absent or
empty, relay is disabled and emails are stored only (existing behavior).
* feat(ses): implement SMTP relay with Vert.x MailClient and Mime4j
Add SmtpRelay that forwards SES emails to a configured SMTP server
using a dedicated Vert.x MailClient built from EmulatorConfig settings.
Simple emails are sent as MailMessage with From/To/Cc/Bcc/ReplyTo/
Subject/Text/Html. Raw MIME emails are parsed with Apache Mime4j to
extract headers and body, then sent via the same MailClient. When SES
Destinations is provided, it is used as the authoritative envelope
recipient list (MIME Cc headers do not add extra SMTP recipients).
Relay is dispatched asynchronously on a dedicated daemon thread with
a 30-second send timeout. Failures are logged with stack traces but
never affect the API response. The executor and MailClient are only
created when smtp-host is configured and ses.enabled is true, and
shut down in @PreDestroy.
SesService calls SmtpRelay.relay/relayRaw after storing emails so
the inspection endpoint always has the data regardless of relay.
Tests: SmtpRelayTest (12 cases) covers simple/raw relay, disabled
path, error swallowing, base64 decoding, HTML content type, envelope
fallback. SesServiceSmtpTest (5 cases) verifies relay integration
and store persistence.
* docs(ses): document SMTP relay configuration
Add SMTP Relay section to docs/services/ses.md with configuration
example, docker-compose snippet with Mailpit, and behavioral notes.
Add SMTP settings to the YAML sample and environment variable table
in docs/configuration/application-yml.md.
* fix(ses): preserve body against attachment overwrite and extract Bcc from raw MIME
- extractBodyFromEntity now only sets text/html when not already set, so a
text-typed attachment in multipart/mixed cannot clobber the body picked up
from multipart/alternative.
- doRelayRaw now reads Bcc from MIME headers alongside To/Cc when the caller
did not supply Destinations.
* fix(ses): initialize Vert.x NTLMEngineImpl at run time for native image
The vertx-mail-client dependency brings in io.vertx.ext.mail.impl.sasl.NTLMEngineImpl,
whose static state embeds a SecureRandom instance. GraalVM native-image rejects
build-time Random/SecureRandom objects because the cached seed makes runtime
behavior unpredictable. Mark the class for run-time initialization, matching the
existing entry for the Apache HttpClient NTLM engine.
* feat(lambda): support ScalingConfig.MaximumConcurrency on SQS event source mappings
Wire-level support for ScalingConfig on CreateEventSourceMapping,
UpdateEventSourceMapping, GetEventSourceMapping, and
ListEventSourceMappings:
- New ScalingConfig model carrying MaximumConcurrency (Integer, nullable).
- Create and Update parse ScalingConfig from the request, validate range
(2-1000), reject non-SQS event sources with InvalidParameterValueException.
- Response includes ScalingConfig only when a cap is set; omitted when
null, matching AWS behavior.
- Update with an empty ScalingConfig clears the cap (AWS reset semantics).
The value is persisted on the EventSourceMapping but not yet enforced at
invocation time — the SQS poller today serializes to one concurrent
invocation per ESM regardless. Real parallel dispatch capped by
MaximumConcurrency is a follow-up (Scope B).
Tests:
- EsmIntegrationTest: 6 new cases covering round-trip, below/above range
rejection, non-SQS rejection, omission when unset, add-then-clear via
update.
- LambdaEsmScalingConfigTest (SDK compat): 5 cases verifying SDK typed
ScalingConfig round-trips, InvalidParameterValueException on range
violations, and add/clear lifecycle via update.
* fix(lambda): reject non-integer MaximumConcurrency and ScalingConfig on non-SQS sources
- parseScalingConfig now detects fractional values (e.g. 2.5) and
returns InvalidParameterValueException instead of silently truncating.
- Empty ScalingConfig ({}) on a non-SQS event source is now rejected.
Previously the non-SQS check only fired when MaximumConcurrency was
non-null, so an empty ScalingConfig on Kinesis / DynamoDB Streams
slipped through.
- Two new integration tests cover both cases.
* fix(lambda): tighten ScalingConfig input validation
- Reject non-object ScalingConfig (e.g. "foo", []) with 400 instead of
silently treating it as absent. In update paths this previously cleared
an existing cap unintentionally.
- Reject non-numeric MaximumConcurrency (e.g. string "7"). AWS expects a
JSON number on the wire; the previous toString + parseInt path accepted
strings that real AWS would reject.
- Use longValue() before range-checking to avoid intValue() overflow on
large inputs (e.g. 5000000000) that would produce a negative value and
a misleading error message.
- Two new integration tests: string MaximumConcurrency and non-object
ScalingConfig.
* fix(lambda): add NaN/Infinity guard and expand ScalingConfig test coverage
- parseScalingConfig now explicitly rejects NaN and Infinity rather than
letting them fall through to longValue() with a misleading error.
- The post-range non-SQS guard was flagged as dead code by the reviewer
but is in fact reachable (non-SQS + valid numeric MaximumConcurrency).
Retained and confirmed by the existing @Order(43) test.
- New tests: update range validation (below/above on PUT), and list
with mixed ScalingConfig presence across ESMs.
* fix(ecr): fixing port and network issues on ecr
* fix: issue on merge with main
* fix(ecr): connect containers to network after start only when port bindings exist