* Use more idiomatic map creation in HealthController
* Remove unnecessary `@Inject` from HealthController
The annotation is not needed as there is a single constructor
* feat: support GenerateSecretString and Description for AWS::SecretsManager::Secret in CloudFormation
* fix: reject both SecretString and GenerateSecretString per AWS spec
* feat: AWS ECR Override for Lambda images
To support users who wish to pull AWS Lambda images from private registries (eg Artifactory hosted proxy repos), a new config option / environment variable is introduced.
resolves#165
Add the newer resource-based tag operations (ListTagsForResource,
TagResource, UntagResource) to the CloudWatch Logs handler. These
operations use ARN-based resource identification instead of the older
log group name-based operations (ListTagsLogGroup, TagLogGroup,
UntagLogGroup).
The implementation extracts the log group name from the resource ARN
and delegates to the existing tag service methods.
Fixes#77
* fix(s3Notification): ensure filter in the XML body does not crash the xml parser
* fix(S3): notification configuration should support filtering by key name
* refacto: use a generic xml parser method as a base, instead of creating a while new XML parser
* fix(s3): return CommonPrefixes in ListObjects when delimiter is specified
ListObjects with a delimiter silently dropped nested keys instead of
grouping them into CommonPrefixes entries. Refactor the delimiter logic
to properly separate direct objects from common prefixes and include
them in the XML response, matching real S3 ListObjectsV2 behavior.
docs(s3): add reference link for using prefixes in ListObjects
* refactor(s3): following copilot review, sort common prefixes and all objects in ListObjects response. Update integration tests to reflect changes in object ordering.
* feat(s3): implement maxKeys limit for ListObjects with delimiter as suggested by copilot in the scope of CommonPrefix fix. Added a test to cover it
* fix(s3): enhance delimiter handling in ListObjects to correctly separate direct objects and common prefixes. Update logic to maintain maxKeys behavior and ensure proper sorting of results, aligning with S3 ListObjectsV2 specifications.
* fix(s3): update ListObjectsResult to include isTruncated flag and adjust XML response in S3Controller to reflect this change. Enhance tests to verify truncation behavior aligns with S3 ListObjectsV2 specifications.
* fix(s3): ensure Prefix element in ListBucketResult is not null by providing an empty string fallback when prefix is null following test results in floci-compatibility-tests
* fix(sns): pass messageDeduplicationId from FIFO topics to SQS FIFO queues
SnsService.deliverMessage was passing null as the messageDeduplicationId
to sqsService.sendMessage when delivering to FIFO SQS subscriptions.
This caused the SQS service to throw an InvalidParameterValue exception
for queues without ContentBasedDeduplication enabled. The exception was
silently swallowed by the catch block, resulting in silent message loss.
Thread the resolved deduplication ID through deliverMessage for both
publish() and publishBatch() call sites.
* fix(sns): resolve ContentBasedDeduplication in publishBatch and add FIFO dedup tests
* feat: add /_floci/health endpoint and Dockerfile.seed for persistence
* chore: remove Dockerfile.seed and persistence docs, keep health endpoint only
* fix: address PR review comments on health endpoint
- Change edition from 'community' to 'floci-open-source'
- Show all services in health response (enabled='running', disabled='available')
- Support both /_floci/health and /_localstack/health paths for backward compatibility
* fix: use floci-always-free edition value per reviewer preference
* test: assert full JSON response in health endpoint tests
* test: use raw JSON string for health endpoint assertion
* fix(s3): resolve file/folder name collision on local filesystem
When using floci persistent option with Scala Spark. Spark creates S3 keys doing a PutObject
for something like `output.parquet/part-0001.parquet` and then another PutObject for
`output.parquet`. It work on S3 since it allows it.
Append a `.s3data` suffix to all stored data files on disk to prevent collision
* fix(s3): add test for object marker and child file conflict resolution
* fix(s3): refactor versioned file test to use separate S3Service instance
Startup hooks that make HTTP calls back to floci (e.g. aws cli) deadlocked
because they ran synchronously during StartupEvent, before the HTTP server
bound to port 4566. Hooks now run on a virtual thread that polls for port
readiness first. When no hooks are configured, behavior is unchanged.
* fix(dynamodb): fix FilterExpression handling for BOOL, List/Set contains, and nested attribute paths
- Add BOOL type support to extractScalarValue() so comparison operators
like <> work correctly with boolean attributes
- Extend contains() to support L (List), SS (String Set), and NS
(Number Set) types instead of only scalar string substring matching
- Support dotted attribute paths in attribute_exists/attribute_not_exists
by navigating through DynamoDB Map (M) structure
Fixes#126
* fix: route SQS JSON 1.0 requests sent to queue URL path correctly (#99)
* fix: route SQS JSON 1.0 requests sent to queue URL path correctly
Newer AWS SDKs (e.g. aws-sdk-sqs Ruby gem >= 1.71) send JSON 1.0
requests to the queue URL path (/{accountId}/{queueName}) rather than
POST /. These were matched by S3Controller's /{bucket}/{key:.+} handler,
returning NoSuchBucket or InvalidArgument XML errors.
Added a @PreMatching ContainerRequestFilter (SqsQueueUrlFilter) that
rewrites the request URI to POST / before JAX-RS routing when both
Content-Type is application/x-amz-json-1.0 and X-Amz-Target starts with
AmazonSQS. The existing AwsJsonController dispatcher then handles the
request normally.
A @Consumes-based approach was attempted first but is ineffective in
RESTEasy Reactive: @Consumes only affects method selection within a
class, not between competing resource classes, so S3Controller was
still selected at the class-routing stage.
Closes#17
* feat(cognito): add group management support
* fix(cognito): handle null precedence in createGroup request
* test(cognito): add tests for JWT escaping special characters in group names and user pool deletion cascading groups
* feat(cognito): enhance group listing by sorting and improve group name validation
* test(cognito): enhance group deletion test to verify group absence after user pool deletion
* feat(cognito): update group and user models to set last modified date on changes
* feat(cognito): update deleteGroup method to set last modified date for users when removing from group
* fix(sns): honor RawMessageDelivery attribute for SQS subscriptions
* fix(sns): address PR review feedback on RawMessageDelivery
- Preserve original SNS attribute DataType (Number, Binary, etc.) by
changing the internal messageAttributes type from Map<String,String>
to Map<String,MessageAttributeValue> throughout the publish pipeline
- Update SnsQueryHandler and SnsJsonHandler to parse DataType from
incoming requests and construct typed MessageAttributeValue objects
- Return Collections.emptyMap() from toSqsMessageAttributes instead
of null for safety on non-raw delivery paths
- Use UUID-based queue names in raw delivery tests for isolation
- Add test asserting message attributes (including Number type) are
forwarded correctly to SQS in raw delivery mode
The AWS SDK v2 uses the __type field in JSON error responses to instantiate
typed exceptions. Query-protocol codes such as
AWS.SimpleQueueService.NonExistentQueue were being forwarded verbatim into
the JSON __type field, causing the SDK to fall back to a generic SqsException
instead of QueueDoesNotExistException.
Add a jsonType() method to AwsException that maps Query-protocol codes to
their JSON-protocol equivalents (e.g. QueueDoesNotExist, QueueNameExists).
Both AwsExceptionMapper and the inline catch in AwsJsonController now call
jsonType() so the mapping is applied consistently across all code paths.
Add contentEncoding field to S3Object and thread it through putObject,
copyObject, getObject, and headObject. aws-chunked is excluded from
persistence as it is a transfer-protocol marker, not a real encoding.
CopyObject respects x-amz-metadata-directive: REPLACE by adopting the
new Content-Encoding from the request instead of the source object.
FilterPolicy subscription attribute was accepted and stored but never
evaluated during publish. Messages were delivered to all confirmed
subscriptions regardless of filter rules. Now evaluates filter policies
supporting exact string matching, numeric comparisons, prefix matching,
exists operator, and anything-but operator per SNS specification.
Fixes#49
AWS SDKs rigorously depend on standard HTTP identification headers
(like `x-amz-request-id` and `x-amzn-RequestId`) to completely and
accurately construct the `ResponseMetadata` payload in their clients.
Because Floci lacked these headers on generic API responses, the SDK
failed to parse identifiers (resulting in `$metadata.requestId` resolving
to `undefined`).
This commit introduces a JAX-RS `AwsRequestIdFilter` to automatically
and globally append these necessary structural headers to every HTTP
response, mapped via a single uniformly-generated UUID. Preexisting
explicitly set controllers (such as Lambda's Invoke) are bypassed
to preserve context.
Added `AwsRequestIdFilterIntegrationTest` verifying end-to-end
protocol formats.
Fixes#145
Implement S3 presigned POST (browser-based) uploads via multipart/form-data
POST to /{bucket}. This is the standard AWS mechanism for browser-based
file uploads using pre-signed policies.
Changes:
- S3Controller: detect multipart/form-data POST on /{bucket} and route to
handlePresignedPost instead of returning InvalidArgument
- Parse multipart body to extract form fields (key, policy, Content-Type,
x-amz-credential, x-amz-signature, etc.) and file data
- Validate content-length-range from the Base64-encoded policy JSON
- Store object via S3Service.putObject with Content-Type from form field
- Return 204 with ETag and Location headers (AWS-compatible response)
Tests:
- 11 new integration tests covering: basic upload, binary data, content-length
validation (reject + accept), missing key/file fields, no-policy upload,
Content-Type precedence (form field over file part), non-existent bucket
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Implement ListShards handler in KinesisJsonHandler
- Support StreamName and StreamARN parameters
- Support ShardFilter with AT_LATEST type
- Support MaxResults parameter
- Add integration tests for ListShards
* feat(lifecycle): add support for startup and shutdown initialization hooks
* test(lifecycle): add unit tests for initialization hooks
* test(lifecycle): add integration tests for initialization hooks
* docs: add documentation and configuration for initialization hooks