Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

chore: release 1.5.10

Hector Venturaf30bd79d673f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f11b6164e4..0dc1095dd2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,9 @@
### Features
+* **cloudformation:** support `AWS::Lambda::EventSourceMapping` resource type — provisions and deletes ESMs backed by SQS, Kinesis, or DynamoDB Streams as part of a stack ([#593](https://github.com/floci-io/floci/issues/593))
+* **dynamodb:** implement `ExportTableToPointInTime`, `DescribeExport`, and `ListExports` — exports run asynchronously and write gzip NDJSON data files plus manifests to S3 in the standard AWS layout ([#612](https://github.com/floci-io/floci/issues/612))
+* **iam:** seed 23 additional AWS managed execution-role policies (`AWSLambdaKinesisExecutionRole`, `AWSLambdaSQSQueueExecutionRole`, `AWSLambdaVPCAccessExecutionRole`, `AmazonECSTaskExecutionRolePolicy`, and others) with correct ARN path components ([#614](https://github.com/floci-io/floci/issues/614))
* **athena:** real SQL execution via `floci-duck` DuckDB sidecar — queries run against actual S3 data; Glue tables are auto-registered as DuckDB views at query time
* **athena:** lazy sidecar lifecycle — `floci/floci-duck:latest` container is started on first query and reused for subsequent executions; `FLOCI_SERVICES_ATHENA_DUCK_URL` bypasses container management
* **athena:** `mock` mode (`FLOCI_SERVICES_ATHENA_MOCK=true`) keeps the previous behavior for unit tests that only verify the state machine
diff --git a/docs/services/cloudformation.md b/docs/services/cloudformation.md
index ae5757c84f..beb95e0ab4 100644
--- a/docs/services/cloudformation.md
+++ b/docs/services/cloudformation.md
@@ -29,6 +29,51 @@
| `DescribeStackSet` | Get StackSet details |
| `CreateStackSet` | Create a new StackSet |
+## Supported Resource Types
+
+Resource types provisioned during `CreateStack` / `DeleteStack`:
+
+| Resource Type | Notes |
+|---|---|
+| `AWS::S3::Bucket` | |
+| `AWS::S3::BucketPolicy` | Accepted; policy not enforced |
+| `AWS::SQS::Queue` | |
+| `AWS::SQS::QueuePolicy` | Accepted; policy not enforced |
+| `AWS::SNS::Topic` | |
+| `AWS::DynamoDB::Table` | |
+| `AWS::DynamoDB::GlobalTable` | |
+| `AWS::Lambda::Function` | Zip (S3 or inline `ZipFile`) and Image package types |
+| `AWS::Lambda::EventSourceMapping` | SQS, Kinesis, and DynamoDB Streams sources |
+| `AWS::IAM::Role` | |
+| `AWS::IAM::User` | |
+| `AWS::IAM::AccessKey` | |
+| `AWS::IAM::Policy` | |
+| `AWS::IAM::ManagedPolicy` | |
+| `AWS::IAM::InstanceProfile` | |
+| `AWS::SSM::Parameter` | |
+| `AWS::KMS::Key` | |
+| `AWS::KMS::Alias` | |
+| `AWS::SecretsManager::Secret` | |
+| `AWS::ECR::Repository` | |
+| `AWS::Events::Rule` | |
+| `AWS::ApiGateway::RestApi` | |
+| `AWS::ApiGateway::Resource` | |
+| `AWS::ApiGateway::Method` | |
+| `AWS::ApiGateway::Deployment` | |
+| `AWS::ApiGateway::Stage` | |
+| `AWS::ApiGatewayV2::Api` | |
+| `AWS::ApiGatewayV2::Route` | |
+| `AWS::ApiGatewayV2::Integration` | |
+| `AWS::ApiGatewayV2::Stage` | |
+| `AWS::ApiGatewayV2::Deployment` | |
+| `AWS::Pipes::Pipe` | |
+| `AWS::CloudFormation::Stack` | Nested stacks (stubbed — returns synthetic stack ID) |
+| `AWS::CDK::Metadata` | Accepted; no-op |
+| `AWS::Route53::HostedZone` | Stubbed |
+| `AWS::Route53::RecordSet` | Stubbed |
+
+All other resource types are accepted without error and assigned a synthetic physical ID, so templates with unsupported types still deploy rather than fail.
+
## Examples
```bash
@@ -91,3 +136,48 @@ aws cloudformation delete-change-set \
--change-set-name my-change-set \
--endpoint-url $AWS_ENDPOINT_URL
```
+
+## Lambda + SQS Event Source Mapping
+
+Deploy a Lambda function wired to an SQS queue as a single stack:
+
+```yaml
+# template.yml
+Resources:
+ MyQueue:
+ Type: AWS::SQS::Queue
+ Properties:
+ QueueName: my-queue
+
+ MyFunction:
+ Type: AWS::Lambda::Function
+ Properties:
+ FunctionName: my-function
+ Runtime: nodejs22.x
+ Handler: index.handler
+ Role: arn:aws:iam::000000000000:role/lambda-role
+ Code:
+ ZipFile: |
+ exports.handler = async (event) => {
+ console.log(JSON.stringify(event));
+ };
+
+ MyESM:
+ Type: AWS::Lambda::EventSourceMapping
+ Properties:
+ FunctionName: !Ref MyFunction
+ EventSourceArn: !GetAtt MyQueue.Arn
+ Enabled: true
+ BatchSize: 10
+```
+
+```bash
+aws cloudformation create-stack \
+ --stack-name my-lambda-sqs-stack \
+ --template-body file://template.yml \
+ --endpoint-url $AWS_ENDPOINT_URL
+```
+
+!!! note "Dependency ordering"
+ Use `!Ref MyFunction` (not a plain string) for `FunctionName` so CloudFormation
+ provisions the function before the event source mapping.
diff --git a/docs/services/dynamodb.md b/docs/services/dynamodb.md
index 9d56324dc4..53343fd707 100644
--- a/docs/services/dynamodb.md
+++ b/docs/services/dynamodb.md
@@ -27,6 +27,14 @@
| `TagResource` | Tag a table |
| `UntagResource` | Remove tags |
| `ListTagsOfResource` | List tags |
+| `DescribeContinuousBackups` | Get PITR backup configuration |
+| `UpdateContinuousBackups` | Enable/disable PITR |
+| `DescribeKinesisStreamingDestination` | List Kinesis streaming destinations |
+| `EnableKinesisStreamingDestination` | Enable Kinesis streaming for a table |
+| `DisableKinesisStreamingDestination` | Disable Kinesis streaming for a table |
+| `ExportTableToPointInTime` | Export table data to S3 as gzip NDJSON |
+| `DescribeExport` | Get export status and metadata |
+| `ListExports` | List exports, optionally filtered by table ARN |
## Streams {#streams}
@@ -109,4 +117,36 @@ aws dynamodb create-table \
}]' \
--billing-mode PAY_PER_REQUEST \
--endpoint-url $AWS_ENDPOINT_URL
+```
+
+## Export to S3
+
+Export table data to an S3 bucket as gzip-compressed NDJSON (DynamoDB JSON format):
+
+```bash
+# Create a bucket to receive the export
+aws s3 mb s3://my-exports --endpoint-url $AWS_ENDPOINT_URL
+
+# Start an export
+EXPORT_ARN=$(aws dynamodb export-table-to-point-in-time \
+ --table-arn arn:aws:dynamodb:us-east-1:000000000000:table/Users \
+ --s3-bucket my-exports \
+ --s3-prefix exports \
+ --export-format DYNAMODB_JSON \
+ --query ExportDescription.ExportArn --output text \
+ --endpoint-url $AWS_ENDPOINT_URL)
+
+# Poll until COMPLETED
+aws dynamodb describe-export \
+ --export-arn $EXPORT_ARN \
+ --query ExportDescription.ExportStatus \
+ --endpoint-url $AWS_ENDPOINT_URL
+
+# List exports for a table
+aws dynamodb list-exports \
+ --table-arn arn:aws:dynamodb:us-east-1:000000000000:table/Users \
+ --endpoint-url $AWS_ENDPOINT_URL
+```
+
+The export writes to `s3://<bucket>/<prefix>/AWSDynamoDB/<exportId>/data/` as one or more `.json.gz` files, along with `manifest-summary.json` and `manifest-files.json` — the same layout as real AWS DynamoDB exports.
```
\ No newline at end of file
diff --git a/docs/services/iam.md b/docs/services/iam.md
index f24c1c6d27..5642bfeb5e 100644
--- a/docs/services/iam.md
+++ b/docs/services/iam.md
@@ -38,6 +38,24 @@
### Login Profiles
`CreateLoginProfile` · `DeleteLoginProfile` · `UpdateLoginProfile`
+## AWS Managed Policies
+
+Floci seeds a catalog of commonly-used AWS managed policies at startup. These are attachable immediately without any setup:
+
+**General access**
+`AdministratorAccess` · `PowerUserAccess` · `ReadOnlyAccess` · `IAMFullAccess` · `AmazonS3FullAccess` · `AmazonS3ReadOnlyAccess` · `AmazonDynamoDBFullAccess` · `AmazonEC2FullAccess` · `AmazonSQSFullAccess` · `AmazonSNSFullAccess` · `AmazonVPCFullAccess` · `CloudWatchFullAccess` · `AWSLambdaFullAccess`
+
+**Lambda execution roles** (`arn:aws:iam::aws:policy/service-role/...`)
+`AWSLambdaBasicExecutionRole` · `AWSLambdaBasicDurableExecutionRolePolicy` · `AWSLambdaDynamoDBExecutionRole` · `AWSLambdaKinesisExecutionRole` · `AWSLambdaMSKExecutionRole` · `AWSLambdaSQSQueueExecutionRole` · `AWSLambdaVPCAccessExecutionRole`
+
+**ECS / EKS execution roles**
+`AmazonECSTaskExecutionRolePolicy` · `AmazonEKSFargatePodExecutionRolePolicy`
+
+**Other execution roles**
+`AmazonS3ObjectLambdaExecutionRolePolicy` · `CloudWatchLambdaInsightsExecutionRolePolicy` · `CloudWatchLambdaApplicationSignalsExecutionRolePolicy` · `AWSConfigRulesExecutionRole` · `AWSMSKReplicatorExecutionRole` · `AWS-SSM-DiagnosisAutomation-ExecutionRolePolicy` · `AWS-SSM-RemediationAutomation-ExecutionRolePolicy` · `AmazonSageMakerGeospatialExecutionRole` · `AmazonSageMakerCanvasEMRServerlessExecutionRolePolicy` · `SageMakerStudioBedrockFunctionExecutionRolePolicy` · `SageMakerStudioDomainExecutionRolePolicy` · `SageMakerStudioQueryExecutionRolePolicy` · `AmazonDataZoneDomainExecutionRolePolicy` · `AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy` · `AWSPartnerCentralSellingResourceSnapshotJobExecutionRolePolicy`
+
+All seeded policies use a permissive wildcard document since Floci does not enforce IAM policy evaluation by default.
+
## IAM Enforcement Mode
By default Floci accepts any credentials without enforcing IAM policies — all requests are allowed through regardless of what policies are attached to the calling identity. This preserves backward compatibility and keeps the default setup frictionless.
diff --git a/docs/services/index.md b/docs/services/index.md
index 247234d1e4..5cb4f58822 100644
--- a/docs/services/index.md
+++ b/docs/services/index.md
@@ -14,7 +14,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [SQS](sqs.md) | `POST /` with `Action=` param | Query / JSON | 20 |
| [SNS](sns.md) | `POST /` with `Action=` param | Query / JSON | 17 |
| [S3](s3.md) | `/{bucket}/{key}` | REST XML | 58 |
-| [DynamoDB](dynamodb.md) | `POST /` + `X-Amz-Target: DynamoDB_20120810.*` | JSON 1.1 | 20 |
+| [DynamoDB](dynamodb.md) | `POST /` + `X-Amz-Target: DynamoDB_20120810.*` | JSON 1.1 | 28 |
| [DynamoDB Streams](dynamodb.md#streams) | `POST /` + `X-Amz-Target: DynamoDBStreams_20120810.*` | JSON 1.1 | 4 |
| [Lambda](lambda.md) | `/2015-03-31/functions/...` | REST JSON | 30 |
| [API Gateway v1](api-gateway.md) | `/restapis/...` | REST JSON | 62 |
@@ -26,7 +26,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [Kinesis](kinesis.md) | `POST /` + `X-Amz-Target: Kinesis_20131202.*` | JSON 1.1 | 24 |
| [Secrets Manager](secrets-manager.md) | `POST /` + `X-Amz-Target: secretsmanager.*` | JSON 1.1 | 16 |
| [Step Functions](step-functions.md) | `POST /` + `X-Amz-Target: AmazonStatesService.*` | JSON 1.1 | 18 |
-| [CloudFormation](cloudformation.md) | `POST /` with `Action=` param | Query | 18 |
+| [CloudFormation](cloudformation.md) | `POST /` with `Action=` param | Query | 19 |
| [EventBridge](eventbridge.md) | `POST /` + `X-Amz-Target: AmazonEventBridge.*` | JSON 1.1 | 16 |
| [EventBridge Scheduler](scheduler.md) | `/schedules/*`, `/schedule-groups/*` | REST JSON | 9 |
| [CloudWatch Logs](cloudwatch.md) | `POST /` + `X-Amz-Target: Logs.*` | JSON 1.1 | 17 |
diff --git a/pom.xml b/pom.xml
index 2f3dcb5934..18b4322a0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>io.github.hectorvent</groupId>
<artifactId>floci</artifactId>
- <version>1.5.9</version>
+ <version>1.5.10</version>
<packaging>jar</packaging>
<name>Floci</name>