Documentation Index Fetch the complete documentation index at: https://mintlify.com/fredpena/floci/llms.txt
Use this file to discover all available pages before exploring further.
Lambda
Protocol: REST JSON
Endpoint: http://localhost:4566/2015-03-31/functions/...
Lambda runs your function code inside real Docker containers — the same way real AWS Lambda does.
Lambda requires the Docker socket. Mount it in your compose file: services :
floci :
volumes :
- /var/run/docker.sock:/var/run/docker.sock
Supported Operations
Operation Description CreateFunctionDeploy a Lambda function GetFunctionGet function details and download URL GetFunctionConfigurationGet runtime configuration ListFunctionsList all functions UpdateFunctionCodeUpload new code DeleteFunctionRemove a function InvokeInvoke a function synchronously or asynchronously CreateEventSourceMappingConnect SQS / Kinesis / DynamoDB Streams to a function GetEventSourceMappingGet event source mapping details ListEventSourceMappingsList all event source mappings UpdateEventSourceMappingUpdate a mapping DeleteEventSourceMappingRemove a mapping PublishVersionPublish an immutable version CreateAliasCreate a named alias pointing to a version GetAliasGet alias details ListAliasesList all aliases for a function UpdateAliasUpdate an alias DeleteAliasDelete an alias
Configuration
floci :
services :
lambda :
enabled : true
ephemeral : false # Remove container after each invocation
default-memory-mb : 128
default-timeout-seconds : 3
docker-host : unix:///var/run/docker.sock
runtime-api-base-port : 9200
runtime-api-max-port : 9299
code-path : ./data/lambda-code # ZIP storage location
poll-interval-ms : 1000
container-idle-timeout-seconds : 300 # Idle container cleanup
Supported Runtimes
Any runtime with an official AWS Lambda container image works with Floci — for example: nodejs22.x, python3.13, java21, go1.x, provided.al2023.
Examples
export AWS_ENDPOINT = http :// localhost : 4566
# Package a simple Node.js function
cat > index.mjs << 'EOF'
export const handler = async (event) => {
console.log("Event:", JSON.stringify(event));
return { statusCode: 200, body: JSON.stringify({ hello: "world" }) };
};
EOF
zip function.zip index.mjs
# Deploy the function
aws lambda create-function \
--function-name my-function \
--runtime nodejs22.x \
--role arn:aws:iam::000000000000:role/lambda-role \
--handler index.handler \
--zip-file fileb://function.zip \
--endpoint-url $AWS_ENDPOINT
# Invoke synchronously
aws lambda invoke \
--function-name my-function \
--payload '{"key":"value"}' \
--cli-binary-format raw-in-base64-out \
response.json \
--endpoint-url $AWS_ENDPOINT
cat response.json
# Invoke asynchronously
aws lambda invoke \
--function-name my-function \
--invocation-type Event \
--payload '{"key":"value"}' \
--cli-binary-format raw-in-base64-out \
/dev/null \
--endpoint-url $AWS_ENDPOINT
# Update code
zip function.zip index.mjs
aws lambda update-function-code \
--function-name my-function \
--zip-file fileb://function.zip \
--endpoint-url $AWS_ENDPOINT
Event Source Mappings
Connect Lambda to SQS, Kinesis, or DynamoDB Streams:
# SQS trigger
QUEUE_ARN = $( aws sqs get-queue-attributes \
--queue-url $AWS_ENDPOINT /000000000000/orders \
--attribute-names QueueArn \
--query Attributes.QueueArn --output text \
--endpoint-url $AWS_ENDPOINT )
aws lambda create-event-source-mapping \
--function-name my-function \
--event-source-arn $QUEUE_ARN \
--batch-size 10 \
--endpoint-url $AWS_ENDPOINT
Supported event sources for mappings: SQS , Kinesis , and DynamoDB Streams .
API Gateway
Floci supports both API Gateway v1 (REST APIs) and API Gateway v2 (HTTP APIs).
v1 — REST APIs
v2 — HTTP APIs
Protocol: REST JSON
Endpoint: http://localhost:4566/restapis/...Supported Operations Category Operations APIs CreateRestApi, GetRestApi, GetRestApis, UpdateRestApi, DeleteRestApi Resources CreateResource, GetResource, GetResources, UpdateResource, DeleteResource Methods PutMethod, GetMethod, DeleteMethod Method Responses PutMethodResponse, GetMethodResponse, DeleteMethodResponse Integrations PutIntegration, GetIntegration, DeleteIntegration Integration Responses PutIntegrationResponse, GetIntegrationResponse, DeleteIntegrationResponse Deployments CreateDeployment, GetDeployment, GetDeployments Stages CreateStage, GetStage, GetStages, UpdateStage, DeleteStage API Keys CreateApiKey, GetApiKey, GetApiKeys, UpdateApiKey, DeleteApiKey Usage Plans CreateUsagePlan, GetUsagePlan, GetUsagePlans, UpdateUsagePlan, DeleteUsagePlan Base Path Mappings CreateBasePathMapping, GetBasePathMapping, DeleteBasePathMapping
Example export AWS_ENDPOINT = http :// localhost : 4566
# Create a REST API
API_ID = $( aws apigateway create-rest-api \
--name "My API" \
--query id --output text \
--endpoint-url $AWS_ENDPOINT )
# Get the root resource
ROOT_ID = $( aws apigateway get-resources \
--rest-api-id $API_ID \
--query 'items[?path==`/`].id' --output text \
--endpoint-url $AWS_ENDPOINT )
# Create a resource
RESOURCE_ID = $( aws apigateway create-resource \
--rest-api-id $API_ID \
--parent-id $ROOT_ID \
--path-part users \
--query id --output text \
--endpoint-url $AWS_ENDPOINT )
# Add a GET method
aws apigateway put-method \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method GET \
--authorization-type NONE \
--endpoint-url $AWS_ENDPOINT
# Add a Lambda proxy integration
aws apigateway put-integration \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method GET \
--type AWS_PROXY \
--integration-http-method POST \
--uri "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:000000000000:function:my-function/invocations" \
--endpoint-url $AWS_ENDPOINT
# Deploy to a stage
aws apigateway create-deployment \
--rest-api-id $API_ID \
--stage-name dev \
--endpoint-url $AWS_ENDPOINT
# Call the deployed API
curl http://localhost:4566/restapis/ $API_ID /dev/_user_request_/users
Protocol: REST JSON
Endpoint: http://localhost:4566/v2/apis/...Supported Operations Category Operations APIs CreateApi, GetApi, GetApis, DeleteApi Routes CreateRoute, GetRoute, GetRoutes, DeleteRoute Integrations CreateIntegration, GetIntegration, GetIntegrations Authorizers CreateAuthorizer, GetAuthorizer, GetAuthorizers, DeleteAuthorizer Stages CreateStage, GetStage, GetStages, DeleteStage Deployments CreateDeployment, GetDeployments
Example export AWS_ENDPOINT = http :// localhost : 4566
# Create an HTTP API
API_ID = $( aws apigatewayv2 create-api \
--name "My HTTP API" \
--protocol-type HTTP \
--query ApiId --output text \
--endpoint-url $AWS_ENDPOINT )
# Create a Lambda integration
INTEGRATION_ID = $( aws apigatewayv2 create-integration \
--api-id $API_ID \
--integration-type AWS_PROXY \
--integration-uri "arn:aws:lambda:us-east-1:000000000000:function:my-function" \
--payload-format-version 2.0 \
--query IntegrationId --output text \
--endpoint-url $AWS_ENDPOINT )
# Create a route
aws apigatewayv2 create-route \
--api-id $API_ID \
--route-key "GET /users" \
--target "integrations/ $INTEGRATION_ID " \
--endpoint-url $AWS_ENDPOINT
# Deploy
aws apigatewayv2 create-stage \
--api-id $API_ID \
--stage-name dev \
--auto-deploy \
--endpoint-url $AWS_ENDPOINT