Commit Graph
676 Commits
Author SHA1 Message Date
Ahmed khaled 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
2026-06-20 11:45:37 -05:00
Stuart Lang 760d48b91a feat(neptune): support neo4j backend for openCypher via NEPTUNE_DB_TYPE (#1449)
* feat(neptune): support neo4j backend for openCypher via NEPTUNE_DB_TYPE

Neptune emulation always started a TinkerPop Gremlin Server, which only
speaks Gremlin. Add a global db-type selector (FLOCI_SERVICES_NEPTUNE_DB_TYPE,
mirroring LocalStack's NEPTUNE_DB_TYPE) so clusters can be backed by Neo4j and
served over the Bolt protocol for openCypher.

- Add NeptuneDbType enum (gremlin -> 8182, neo4j -> 7687) with alias parsing
- Add db-type and default-neo4j-image config (default neo4j:5-community)
- Resolve image/port per engine in NeptuneService and NeptuneContainerManager
- Run Neo4j with NEO4J_AUTH=none and probe readiness via the Bolt handshake
- Add openCypher/Bolt integration test and NeptuneDbType unit test
- Document the new option in README and docs/services/neptune.md

* test(neptune): assert DeleteDBCluster cleanup and clarify docs

Assert the openCypher integration test's DeleteDBCluster cleanup returns
200 so a failed delete surfaces instead of silently leaking a backend
container and proxy port into later tests.

Also drop the misleading backend ports from the db-type table (users
connect via the proxy port range, not the container-native port) and
correct the SigV4 auth-header comment to reference the management
request routing.

* fix(neptune): treat all-zero Bolt handshake reply as not-ready

The Neo4j readiness probe accepted any non-empty response, but Neo4j
answers the Bolt handshake with 0x00000000 when it rejects every
proposed version (Bolt disabled, wrong port, or an unsupported server
version). That made the probe report ready for a backend whose sessions
would then fail. Require a non-zero agreed version for the neo4j
db-type so such a backend times out with a clear error instead.

* fix(neptune): fall back to default db-type on unknown config value

A server-side typo in FLOCI_SERVICES_NEPTUNE_DB_TYPE shouldn't fail the
client's CreateDBCluster. Make NeptuneDbType.fromConfig return an
Optional and have NeptuneService fall back to GREMLIN with a WARN for an
unrecognised value, instead of throwing InvalidParameterValue. The
cluster still comes up on the default engine.
2026-06-20 11:24:00 -05:00
Vishal Goyal 5aee7b6312 fix(cloudformation): merge SAM Globals into resource properties (#1427)
Apply top-level Globals (e.g. Function Handler / Runtime / Timeout,
Api settings) onto each matching SAM resource's properties before
expansion. Resource-level properties take precedence over Globals and
nested maps are deep-merged. Globals is stripped from the template on
every return path.
2026-06-20 11:07:45 -05:00
Vishal Goyal f1204d9d4b feat(cloudformation): generate implicit API Gateway from SAM Api events (#1438)
* feat(cloudformation): generate implicit API Gateway from SAM Api events

Synthesize an implicit AWS::ApiGateway RestApi (RestApi / Resource /
Method / AWS_PROXY Integration / Deployment / Stage) from SAM function
Api events, matching SAM/CloudFormation behavior so a template that
relies on the implicit API can be deployed and served.

Routes are deduped by (path, method); a route whose RestApiId is
explicitly set (non-null) is left untouched; the generated RestApi
uses a collision-safe logical id.

* fix(cloudformation): harden implicit API route generation

- skip Api routes whose Path is a non-literal intrinsic (Ref/Fn::Sub)
  instead of registering them as the API root
- default Method to ANY when given as a non-literal value
- make the Deployment and Stage logical ids collision-safe via uniqueId
2026-06-20 10:06:44 -05:00
MAN$I VERMA 222fec440b fix(acm): restore ACM certificates after restart by ignoring computed getters (#1428) (#1440) 2026-06-20 09:58:54 -05:00
kazamage db840c498d fix(athena): Add partition keys to table metadata response (#1454) 2026-06-20 09:31:42 -05:00
Vinod Kumar Bengaluru 6b1ace916e fix(cfn): delete EC2 security groups (#1472) 2026-06-20 08:22:43 -05:00
Hector Ventura cc70efbad2 feat(dynamodb): TableId, TableClass, OnDemandThroughput; fix deletion-protection error (#1457)
* fix(dynamodb): Limit caps scanned items and index scans carry full cursor

Scan Limit now bounds items read (not matched), returning a cursor when items
remain. Index scans build a LastEvaluatedKey that includes the index key
attributes alongside the base table key, so paging across tied index sort keys
walks every item exactly once. Closes 2 conformance failures.

* feat(dynamodb): TableId, TableClass, OnDemandThroughput; fix deletion-protection error

Generate a stable TableId per table; parse and round-trip TableClass
(TableClassSummary) and OnDemandThroughput on Create/UpdateTable. DeleteTable
under deletion protection now returns ValidationException (protected against
deletion) matching AWS. Closes 7 conformance failures.

* test(dynamodb): expect ValidationException for deletion-protected DeleteTable

This change makes DeleteTable on a deletion-protected table return a
ValidationException to match AWS, so update deletionProtectionEnabled,
which still asserted ResourceInUseException.

Verified against moto/AWS DDB parity: DeletionProtectedException is a
ValidationException.
2026-06-19 20:22:07 -05:00
Ahmed khaled 8e23e740e7 fix(docdb,neptune): stop containers and proxies on emulator shutdown (#1452)
onStop() only tore down ElastiCache and RDS; the DocDb/Neptune managers
expose stopAll() but were never called, leaking containers and proxy
ports across runs. Wire them in (proxies before containers) and verify
in EmulatorLifecycleTest.
2026-06-19 19:13:21 -05:00
José Miguel González Guzmán b4ee4ca489 fix(ec2): omit empty stateReason element in DescribeInstances (#1410)
* fix(core): use self-closing tags for empty XmlBuilder values

XmlBuilder.elem(name, "") produced <name></name> for empty string values, which caused some XML consumers (e.g. Terraform AWS provider) to crash with nil pointer dereference.

Now empty string values render as self-closing <name/> instead, which is semantically identical but avoids the parser crash. Null values remain skipped entirely.

* fix(ec2): conditionally omit stateReason instead of self-closing empty tags

The previous approach (self-closing tags for empty XmlBuilder values)
was wrong for two reasons:
1. AWS emits <tag></tag> (paired tags), not <tag/> — verified against
   botocore rest-xml protocol fixtures (XmlEmptyStrings, XmlEmptyBlobs).
2. Go's encoding/xml tokenizes both forms identically (StartElement +
   EndElement, no CharData), so the Terraform crash persisted either way.

Real fix: stop hardcoding <stateReason><code></code><message></message>
in Ec2QueryHandler for every instance. AWS omits stateReason entirely
when there is none (e.g. a running instance). Now it is only emitted
when stateReasonCode or stateReasonMessage is present.

XmlBuilder.elem() reverted to its original paired-tag behavior.
Added Instance.stateReasonCode/stateReasonMessage model fields.
Updated Ec2InstanceResponseShapeTest to assert null for running
instances (matching real AWS behavior).
2026-06-19 19:03:50 -05:00
MAN$I VERMA 4bd43020d5 fix(cfn): support oauth and callback configurations in UserPoolClient (#1458) 2026-06-19 15:35:27 -05:00
Hector Ventura ac8ae81909 fix(dynamodb): validate ExclusiveStartKey against the key schema (#1443)
Query and Scan now reject an ExclusiveStartKey whose attribute set does not
exactly match the paged key schema (table primary key, plus index keys when an
IndexName is given), with the distinct messages each operation returns. Closes
5 conformance failures.
2026-06-19 10:57:37 -05:00
Hector Ventura 1f99d92554 fix(dynamodb): reject redundant parens, contains() dup operand, begins_with non-string (#1442)
* fix(dynamodb): reject redundant parens, contains() dup operand, begins_with non-string

Add ExpressionEvaluator.validateExpression for structural/semantic checks
DynamoDB rejects at parse time, wired into Put/Delete/Update/Query/Scan
handlers with the correct Invalid <ExprType> prefix. Closes 11 conformance
failures across tier1 paren tests and tier3 exact error-message tests.

* test(dynamodb): expect ValidationException for redundant double parens

scanFilterDoubleNestedParens asserted that ((category = :a)) returns 200,
but real AWS DynamoDB rejects redundant (doubled) parentheses with a
ValidationException at parse time. The new validateExpression() check now
correctly returns 400, so update the test to assert the rejection.

Verified against moto/AWS DDB parity: ((a < b)) fails while
((a = :b) OR (c = :d)) is allowed.
2026-06-19 10:18:22 -05:00
Hector Ventura aaa1faa7fe fix(ui): register StatusResponse for native-image reflection (#1441)
The /_floci/ui/status endpoint returned HTTP 500 under the native image
because Jackson could not serialize UiController.StatusResponse (no
reflection metadata was registered). The interstitial page served by
GET /_floci/ui polls /status and only redirects to the floci-ui sidecar
once it reads {ready:true,url:...}, so a 500 there left the UI stuck on
the loading page even though the floci-ui container was up and healthy.

Register the record for reflection, matching the existing pattern used
by other controller response types (e.g. AwsErrorResponse).
2026-06-19 08:22:37 -05:00
Stuart Lang dba23bf7e2 fix(lambda): redrive failed SQS ESM messages to the DLQ (#1419)
* fix(lambda): redrive failed SQS ESM messages to the DLQ

When an SQS event source mapping invocation failed, the poller left the
message in-flight for the full execution-cover visibility window
(fn.timeout + 30s) instead of returning it to the queue. The message was
therefore never re-received, so ApproximateReceiveCount never crossed
maxReceiveCount and the queue's RedrivePolicy never moved it to the DLQ.

On a failed invocation (and for reported partial-batch failures) reset the
affected messages' visibility to 0 so the next poll re-receives them,
letting the existing redrive machinery move them to the DLQ.

Closes #1416

* fix(lambda): return failed ESM messages using the queue visibility timeout

Address PR review: resetting a failed message's visibility to 0 made it
immediately eligible for redelivery, which spins a tight retry loop for a
persistently failing function (far more aggressive than AWS). Reset to the
queue's configured VisibilityTimeout instead (falling back to the AWS
default of 30s when unset), matching AWS's redelivery cadence while still
letting ApproximateReceiveCount climb so the RedrivePolicy moves the
message to the DLQ.

Also document pollAndInvoke's package-private visibility as test-only.
2026-06-19 00:47:37 -05:00
alexjplant b2aea42072 fix(auth,s3): resolve account context from X-Amz-Credential query param in presigned URLs (#1413)
* feat(auth): parse X-Amz-Credential from query params in AccountResolver and RegionResolver

* fix(auth): fall back to X-Amz-Credential query param in AccountContextFilter

* fix(s3): use request-scoped account ID in PreSignedUrlGenerator credential string

* test(s3): add presigned URL account isolation integration test
2026-06-19 00:39:24 -05:00
Stuart Lang dace94fa80 fix(lambda): return {"status":"OK"} ack body from runtime invocation endpoints (#1418)
* fix(lambda): return {"status":"OK"} ack body from runtime invocation endpoints

The /response, /error and /init/error Runtime API endpoints replied with
HTTP 202 and an empty body. Runtime clients that deserialize the
acknowledgement (e.g. the .NET Amazon.Lambda.RuntimeSupport client) throw
"Could not deserialize the response body" on an empty body, crashing the
runtime process after every failed invocation. Return the AWS-documented
{"status":"OK"} JSON body instead.

* test(lambda): assert Content-Type and parse ack body in runtime tests

Cover the Content-Type: application/json header introduced by sendStatusOk
and parse the acknowledgement as JSON (asserting status == OK) instead of
comparing the raw body string, so harmless formatting changes don't break
the tests.
2026-06-19 00:39:03 -05:00
shrimptails-f d659de942b fix(cognito): align password recovery flow with AWS behavior (#1415) 2026-06-19 00:34:34 -05:00
Konda Balaji Rao 16b58b99c1 fix(ecs): reject negative desiredCount in CreateService and UpdateService (#1409) 2026-06-19 00:24:11 -05:00
Hector Ventura dbad78991d fix(autoscaling): validate MixedInstancesPolicy launch template (#1439)
Reject create/update requests whose MixedInstancesPolicy lacks a usable
LaunchTemplate (no LaunchTemplateId or LaunchTemplateName) with a
ValidationError, instead of persisting a group the reconciler can never
scale out. Also update the missing-launch-source message to mention all
valid sources (LaunchTemplate, LaunchConfigurationName, InstanceId,
MixedInstancesPolicy), matching AWS wording.

Follow-up to #1437.
2026-06-19 00:07:27 -05:00
Jason van Zyl 9236b40073 feat(autoscaling): preserve policy and mixed instances parity (#1437)
* fix(autoscaling): preserve launch template capacity metadata

* feat(autoscaling): preserve target tracking policies

* feat(autoscaling): preserve mixed instances policies
2026-06-18 23:42:31 -05:00
alexjplant 630328547e fix(sqs): message processing from non-default account (#1406)
* fix(sqs): use account-aware queue lookup in doReceiveMessage

The Lambda SQS ESM poller runs on a Vert.x timer thread with no CDI
request scope. doReceiveMessage() used queueStore.get(storageKey) which
falls back to defaultAccountId via AccountAwareStorageBackend, causing
queues under non-default accounts to be invisible to the poller. Switch
to getQueueByUrl(storageKey, queueUrl) for URL-derived, context-free
account resolution, matching sendMessage/deleteMessage.

* fix(sqs): persist messages with account-aware storage in GuardedMessageQueue

GuardedMessageQueue.persist() called messageStore.put() which goes
through AccountAwareStorageBackend.put() and falls back to
defaultAccountId when invoked off the CDI request scope (Lambda ESM
poller on a Vert.x timer thread). This persisted visibility-timeout and
deletion state changes under the wrong account prefix, corrupting
message state for non-default-account queues.

Extract the 12-digit account from the storage key (region::/accountId/
queueName) and call putForAccount(accountId, ...) when the store is an
AccountAwareStorageBackend, with a safe fall-through to put() otherwise.

* test(lambda): add ESM multi-account poller regression test

End-to-end regression for the SQS ESM poller account-aware lookup fix
(M1+M2). Creates a queue, Lambda function, and event source mapping
under non-default account 000000000001 (via a 12-digit AKID SigV4
credential), sends a message, and asserts the poller claims it
(ApproximateNumberOfMessagesNotVisible > 0) within the poll interval.

Before the fix the poller resolved the queue under defaultAccountId and
never fired; this test would have failed. Self-contained with unique
resource names and best-effort cleanup in finally.
2026-06-18 23:32:17 -05:00
Vishal Goyal 9bb1db3a54 fix(cloudformation): record REVIEW_IN_PROGRESS event on change-set creation (#1431)
* fix(cloudformation): record REVIEW_IN_PROGRESS event on change-set creation

A CREATE change set puts a brand-new stack into REVIEW_IN_PROGRESS, but
createChangeSet recorded no stack event, so DescribeStackEvents returned an
empty list for it. AWS and LocalStack return at least the REVIEW_IN_PROGRESS
stack event; tooling that reads StackEvents[0] right after change-set creation
(e.g. the AWS SAM CLI's get_last_event_time) therefore fails on floci with
"list index out of range" before any resources are deployed.

Record the REVIEW_IN_PROGRESS stack-level event when a CREATE change set
creates a new stack, scoped to that path (nested stacks and update change sets
are unaffected). Adds an integration test.

Fixes #1429

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Vishal Goyal <vishal.goyal@home24.de>

* fix(cloudformation): address review — atomic new-stack detection + CREATE gate

Detect first stack creation via the computeIfAbsent mapping function (runs at
most once per key, so it's atomic and won't double-record the event under
concurrent CreateChangeSet calls) instead of a non-atomic containsKey pre-check,
and only record the REVIEW_IN_PROGRESS event for CREATE-type change sets
(null defaults to CREATE, matching createChangeSet).
2026-06-18 18:45:53 -05:00
Jason van ZylandHector Ventura 56706217d3 feat(autoscaling): support group reconciliation and refresh (#1393)
* feat(autoscaling): support group reconciliation and refresh

* fix(ec2): align instance runtime parity

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
2026-06-18 18:14:19 -05:00
Stas Burnashev 31991ac5c3 fix(apigateway): support SQS query-protocol integrations (path-style URI) (#1385)
* fix(apigateway): support SQS query-protocol integrations (path-style URI)

API Gateway → SQS AWS integrations use a path-style integration URI
(arn:aws:apigateway:{region}:sqs:path/{account}/{queue}) and a VTL request
template that renders the SQS query protocol (form-urlencoded,
"Action=SendMessage&QueueUrl=...&MessageBody=..."). This is the canonical AWS
recipe, also supported by LocalStack.

Two gaps blocked it:

- AwsServiceRouter.parseIntegrationUri only accepted the action/{Action} form
  and returned null for path/{resourcePath}, failing with "Cannot parse AWS
  integration URI" (500). It now also parses the path form, leaving the action
  null (the action comes from the rendered body).

- invokeAwsIntegration always parsed the rendered body as JSON and dispatched
  to the JSON handlers. For a path-style target it now parses the body as
  form-urlencoded and dispatches via the new AwsServiceRouter.invokeQuery,
  which routes to the existing SqsQueryHandler.

Also fixes request-template selection: AWS selects the template by the
incoming request Content-Type, but the integration.request.header.Content-Type
override (set to application/x-www-form-urlencoded for these integrations) was
clobbering it before selection, causing spurious 415s. The incoming
Content-Type is now captured before parameter mapping runs.

Closes #1384

* fix(apigateway): align MissingAction message with AwsQueryController and AWS

The MissingAction error message in invokeQuery drifted from the rest of
Floci and from AWS. AwsQueryController and real AWS use
"The request must contain the parameter Action" — match it exactly.
2026-06-18 17:57:45 -05:00
shrimptails-f a922d07e77 fix(cognito): add missing UserPoolClient validation (#1394)
* fix(cognito): add missing UserPoolClient validation

* fix(cognito): align user pool client token validity validation with aws
2026-06-18 17:56:33 -05:00
Jason van Zyl 892f9f7fb8 fix(rds): report DB parameter group attachments (#1392) 2026-06-18 17:53:40 -05:00
Lorenzo Galassi b599646785 fix(secretsmanager): 🐛 honor ListSecrets MaxResults and NextToken pagination (#1383)
* fix(secretsmanager): 🐛 honor ListSecrets MaxResults and NextToken pagination

ListSecrets ignored MaxResults and always returned every secret. Page the
(stably sorted) secret list by MaxResults, emit an opaque NextToken offset
when more results remain, and validate MaxResults (1-100) and NextToken.

Closes #1358

* fix(secretsmanager): 🐛 use InvalidParameterException and CreatedDate order for ListSecrets

Address review on #1383:
- ListSecrets does not model ValidationException; return the modeled
  InvalidParameterException for an out-of-range MaxResults so the SDK maps it
  to a typed exception.
- Sort by CreatedDate (AWS default SortBy) with name as a tiebreaker instead
  of by name only.
2026-06-18 17:52:56 -05:00
MAN$I VERMAandmansiverma897993 ff86b542c4 feat(ec2): support Spot Instance request actions (#1291)
* feat(ec2): support Spot Instance request actions

- Implement requestSpotInstances, describeSpotInstanceRequests, and cancelSpotInstanceRequests in Ec2Service

- Implement RequestSpotInstances, DescribeSpotInstanceRequests, and CancelSpotInstanceRequests XML serialization and request routing in Ec2QueryHandler

- Add LaunchSpecification and SpotInstanceRequest models

- Add spotInstanceLifecycle integration test to cover the full lifecycle

* fix(ec2): fix ResourceType value and default productDescription for Spot Instances

---------

Co-authored-by: mansiverma897993 <vmansi756@gmaail.com>
2026-06-18 17:51:36 -05:00
Lorenzo Galassi 4520e75176 fix(kms): 🐛 wrap RSA DIGEST signatures in PKCS#1 DigestInfo (#1396)
Sign/Verify with MessageType=DIGEST and an RSASSA_PKCS1_V1_5_* algorithm fed
the bare digest to NONEwithRSA, which PKCS#1-pads only the bytes it is given.
Real KMS (and any external verifier) signs DigestInfo{hashOID, digest} per
RFC 8017 9.2, so floci's DIGEST signatures verified internally but failed with
openssl / python cryptography.

Wrap the digest in the ASN.1 DigestInfo structure before NONEwithRSA on both
sign and verify. ECDSA DIGEST (no DigestInfo) and the RAW path are unchanged.

Closes #1345
2026-06-17 01:23:03 -05:00
Jason van Zyl 0cb90bc739 feat(aws): expand EC2 and RDS availability catalogs (#1391) 2026-06-17 00:56:35 -05:00
Hector Ventura 2783108b32 fix(elasticache): register Endpoint for reflection so HybridStorage can persist state (#1403)
In a native image, Jackson could not serialize ReplicationGroup.configurationEndpoint because the Endpoint record lacked reflection metadata, so HybridStorage threw every flush and never wrote elasticache-groups.json. Annotate Endpoint with @RegisterForReflection (matching its sibling models) so persistence works.

Refs #1268
2026-06-17 00:42:13 -05:00
Hector Ventura be9e61d788 feat(ssm): add DescribePatchBaselines and GetDefaultPatchBaseline (#1404)
Return AWS-owned predefined patch baselines (one default per operating system) so Terraform's aws_ssm_patch_baseline data source resolves. Supports DescribePatchBaselines filters OWNER/OPERATING_SYSTEM/NAME_PREFIX and GetDefaultPatchBaseline. Read-only reference data; no customer-owned baselines.

Refs #956
2026-06-17 00:41:24 -05:00
Jason van Zyl f3f481cb4d fix(ec2): enable embedded DNS for instances (#1390) 2026-06-17 00:39:13 -05:00
James Netherton a876db87ef fix(cloudwatch): parse decimal epoch timestamps in JSON protocol handler (#1388)
The AWS SDK v2 serialises Instant values via DateUtils.formatUnixTimestampInstant(),
producing decimal epoch-second strings (e.g. "1750000000.123"). The JSON handler
was using parseInstant(node.asText()), which failed for these values: Instant.parse()
rejects them (not ISO-8601) and Long.parseLong() rejects the decimal point.

This caused two silent failures:
- GetMetricStatistics: StartTime/EndTime parsed as null, defaulting the filter to
  0..MAX_VALUE and returning all datapoints regardless of the requested time range
- PutMetricData: MetricDatum.Timestamp parsed as null, causing metrics to be stored
  with the current time instead of the caller-supplied timestamp

Fix by switching to parseInstantNode(JsonNode), the existing helper that calls
node.asLong() for numeric nodes and already handles this correctly for GetMetricData.
2026-06-17 00:33:14 -05:00
Jason van Zyl 42669aaed9 fix(config): make runtime defaults explicit (#1389) 2026-06-17 00:31:08 -05:00
Hector Ventura f01a680bff fix(cloudformation): create stage from AWS::ApiGateway::Deployment inline StageName (#1400)
AWS::ApiGateway::Deployment accepts an inline StageName; previously the deployment was created but the stage was not, so get-stages returned empty and invoking .../{stage}/_user_request_/... returned Stage not found. Now create the stage (with StageDescription.Description when present) bound to the new deployment.

Refs #1163
2026-06-17 00:03:41 -05:00
Hector Ventura 17d5bb84fa feat(cloudformation): provision Kinesis Firehose delivery streams (#1399)
Inject FirehoseService and add provision + delete handling for AWS::KinesisFirehose::DeliveryStream. Maps DeliveryStreamName and the S3/ExtendedS3 destination configuration (BucketARN, Prefix, BufferingHints) plus Tags. Ref returns the delivery stream name; Fn::GetAtt Arn returns the stream ARN.
2026-06-16 23:37:35 -05:00
James Netherton ca5fb043a7 feat(kms): add EnableKey support (#1381) 2026-06-16 23:17:52 -05:00
Jason van Zyl 660a8bceb3 feat(ssm): execute run commands in EC2 containers (#1387) 2026-06-16 22:51:21 -05:00
Hector Ventura 5cd48f0492 refactor(floci): regroup UI and DuckDB under services.floci (#1397)
Move the UI service classes (FlociUiManager, UiPages) into services.floci.ui and the DuckDB helper (FlociDuckClient, FlociDuckManager) into services.floci.duck, with tests mirrored. Pure package move: importers updated, no behavior change.
2026-06-16 18:57:25 -05:00
David Phillips 01b38bb4bb ci: run focused native compatibility tests (#1375)
* fix: register Glue catalog payloads for native image

* fix: include AppSync parser resources in native image

* fix: include API Gateway VTL native metadata

* ci: run focused native compatibility tests
2026-06-16 18:54:22 -05:00
Hector Ventura 9327a252d6 feat(cloudformation): provision Auto Scaling groups and launch configurations (#1372)
Inject AutoScalingService and add provision + delete handling for
AWS::AutoScaling::LaunchConfiguration and AWS::AutoScaling::AutoScalingGroup.
Launch configurations map ImageId, InstanceType, KeyName, SecurityGroups,
UserData and IamInstanceProfile; groups map the launch configuration or launch
template, sizes, availability zones, target groups, load balancers, health check
and tags. Ref returns the resource name; Fn::GetAtt Arn returns the resource ARN.
Docker-free integration test: CreateStack -> DescribeAutoScalingGroups shows the
group referencing the launch configuration.
2026-06-16 01:05:02 -05:00
Hector Ventura 6004e57c29 feat(cloudformation): provision CloudWatch metric alarms (#1371)
Inject CloudWatchMetricsService and add provision + delete handling for
AWS::CloudWatch::Alarm, mapping AlarmName, Namespace, MetricName, Statistic,
Period, EvaluationPeriods, Threshold, ComparisonOperator, Dimensions, the action
lists and TreatMissingData. Ref returns the alarm name; Fn::GetAtt Arn returns
the alarm ARN. Docker-free integration test: CreateStack -> DescribeAlarms shows
the alarm.
2026-06-16 00:40:03 -05:00
shrimptails-f 571d81afe3 feat(cognito): align user pool client config APIs with AWS behavior (#1360)
* feat(cognito): align CreateUserPoolClient and DescribeUserPoolClient with AWS behavior

* feat(cognito): align user pool client config APIs with AWS behavior
2026-06-16 00:34:17 -05:00
Hector Ventura c269d500f9 feat(cloudformation): provision Kinesis data streams (#1370)
Inject KinesisService and add provision + delete handling for AWS::Kinesis::Stream,
mapping Name, ShardCount, StreamModeDetails, RetentionPeriodHours and Tags. Ref
returns the stream name; Fn::GetAtt Arn returns the stream ARN. Docker-free
integration test: CreateStack -> DescribeStreamSummary shows the stream.
2026-06-16 00:18:24 -05:00
Kenshin Okinaka c267d3ae1c fix(ses): canonicalize only the domain of suppression-list email addresses (#1350)
* fix(ses): canonicalize only the domain of suppression-list emails

The previous change lower-cased the whole EmailAddress, but real AWS SES V2
(verified 2026-06-15) is case-sensitive on the local-part and case-insensitive
only on the domain: PutSuppressedDestination for Foo@Example.COM stores and
reads back Foo@example.com, Foo@x and foo@x are two distinct entries, and a
GET/DELETE whose local-part case differs returns NotFound. Full lower-casing
wrongly merged local-part variants and altered the address on read-back.

normalizeSuppressionEmail now lower-cases only the part after the last '@'
and preserves the local-part. The integration tests are rewritten to pin the
verified behavior: domain-case-insensitive match and de-dup, local-part
case-sensitive (distinct entries), latest Reason wins on a domain-only
collision.

Suppression entries persisted by a pre-canonicalization Floci (trim-only key)
would otherwise become unreachable once the domain is normalized. All five
suppression lookups — PUT / GET / DELETE / send-time check / event resolution —
fall back to the legacy raw-trimmed key via existingSuppressionKey, and PUT
migrates the entry onto the canonical key, so older entries stay readable,
deletable, and still suppress sends, without a re-PUT leaving a stuck
duplicate. A unit test seeds a legacy-keyed entry directly to pin these paths.

* refactor(ses): single-read suppression lookup and safe legacy migration

Address review on the suppression-list case fix:
- existingSuppressionMatch returns the resolved entry with its storage key,
  so GET/DELETE/send-time/event lookups read the store once instead of
  probing with isPresent() and re-fetching (was 2 reads on a canonical hit,
  3 on a legacy hit; per-address in collectSuppressedReasons).
- PutSuppressedDestination writes the canonical key before deleting the
  legacy one it migrated from, so a failed write can't drop the entry.
- The domain-case GET test seeds its own entry, removing the dependency on
  an earlier ordered test.
2026-06-16 00:06:28 -05:00
Konda Balaji Rao 1a42aafcfb fix(core): return XML error for missing action and add volume action fallbacks (#1348)
This commit addresses the XML parser error on clients when requests are made without the 'Action' parameter. Previously, it returned a 204 No Content response with an empty body; now it returns a 400 Bad Request status and a structured XML 'MissingAction' error. It also adds missing EC2 volume actions ('CreateVolume', 'DescribeVolumes', 'DeleteVolume') to the unauthenticated fallback list in the query controller.

Closes #1333
2026-06-15 23:58:37 -05:00
Hector Ventura 57d9ef5ad8 feat(cloudformation): provision CloudWatch Logs log groups (#1369)
Inject CloudWatchLogsService and add provision + delete handling for
AWS::Logs::LogGroup, mapping LogGroupName, RetentionInDays and Tags. Ref returns
the log group name; Fn::GetAtt Arn returns the log-group ARN. Docker-free
integration test: CreateStack -> DescribeLogGroups shows the group.
2026-06-15 23:57:26 -05:00
Hector Ventura 50c768643d feat(cloudformation): provision EKS clusters and node groups (#1368)
Inject EksService and add provision + delete handling for AWS::EKS::Cluster and
AWS::EKS::Nodegroup. Clusters are created via the EKS createCluster API
(RoleArn, ResourcesVpcConfig, version); node groups via createNodegroup under
their cluster. Ref returns the resource name; Fn::GetAtt exposes Arn (and the
cluster Endpoint). Stack deletion removes the cluster/node group.
2026-06-15 23:29:50 -05:00