Lambda
Real function execution — Python, Node.js and provided.* on the host, Java, .NET and Ruby in Docker — with layers, versions, aliases, event source mappings, and Function URLs.
Quick start
import boto3, io, zipfile
zf = io.BytesIO()
with zipfile.ZipFile(zf, "w") as z:
z.writestr("app.py", "def handler(e, c): return {'ok': True}")
lam = boto3.client("lambda", endpoint_url="http://localhost:4566",
region_name="us-east-1",
aws_access_key_id="test", aws_secret_access_key="test")
lam.create_function(FunctionName="f", Runtime="python3.11",
Role="arn:aws:iam::000000000000:role/r",
Handler="app.handler", Code={"ZipFile": zf.getvalue()})
print(lam.invoke(FunctionName="f")["Payload"].read())
Supported operations
66 operations exposed by this service as of MiniStack 1.5.32. Extracted directly from the handler dispatch in the source module.
AddLayerVersionPermission
AddPermission
CheckpointDurableExecution
CreateAlias
CreateEventSourceMapping
CreateFunction
CreateFunctionUrlConfig
DeleteAlias
DeleteEventSourceMapping
DeleteFunction
DeleteFunctionCodeSigningConfig
DeleteFunctionConcurrency
DeleteFunctionEventInvokeConfig
DeleteFunctionUrlConfig
DeleteLayerVersion
DeleteProvisionedConcurrencyConfig
GetAccountSettings
GetAlias
GetDurableExecution
GetDurableExecutionHistory
GetDurableExecutionState
GetEventSourceMapping
GetFunction
GetFunctionCodeSigningConfig
GetFunctionConcurrency
GetFunctionConfiguration
GetFunctionEventInvokeConfig
GetFunctionRecursionConfig
GetFunctionUrlConfig
GetLayerVersion
GetLayerVersionByArn
GetLayerVersionPolicy
GetPolicy
GetProvisionedConcurrencyConfig
Invoke
InvokeWithResponseStream
ListAliases
ListDurableExecutionsByFunction
ListEventSourceMappings
ListFunctionEventInvokeConfigs
ListFunctions
ListFunctionUrlConfigs
ListLayers
ListLayerVersions
ListTags
ListVersionsByFunction
PublishLayerVersion
PublishVersion
PutFunctionCodeSigningConfig
PutFunctionConcurrency
PutFunctionEventInvokeConfig
PutFunctionRecursionConfig
PutProvisionedConcurrencyConfig
RemoveLayerVersionPermission
RemovePermission
SendDurableExecutionCallbackFailure
SendDurableExecutionCallbackHeartbeat
SendDurableExecutionCallbackSuccess
StopDurableExecution
TagResource
UntagResource
UpdateAlias
UpdateEventSourceMapping
UpdateFunctionCode
UpdateFunctionConfiguration
UpdateFunctionUrlConfig
CloudFormation
The CloudFormation engine provisions these resource types via this service:
AWS::Lambda::Alias
AWS::Lambda::EventInvokeConfig
AWS::Lambda::EventSourceMapping
AWS::Lambda::Function
AWS::Lambda::LayerVersion
AWS::Lambda::Permission
AWS::Lambda::Url
AWS::Lambda::Version
AWS::Lambda::LayerVersionPermission
See CloudFormation engine for intrinsic support and lifecycle details.
Known limitations
- SnapStart is emulated mechanism-and-shape: the config round-trips with AWS's constraints, publishing a version initializes its execution environment (Pending → Active, ResourceConflictException while Pending, publish fails on a broken init) and Python snapshot-restore-py hooks run — but no Firecracker snapshot exists, and Java CRaC / .NET hooks do not fire (they live in the RIE bootstrap).
- Java, .NET and Ruby zip functions always run in the AWS runtime image, so they need Docker. Without Docker, the default LAMBDA_STRICT=0 answers their invoke with a 200 placeholder ({"statusCode": 200, "body": "Mock response - <runtime> not supported for local execution"}) instead of running the handler.
- LAMBDA_STRICT=1 runs every invocation in Docker; without Docker you'll hit Runtime.DockerUnavailable (Runtime.DockerError when the daemon is unreachable).
Source
ministack/services/lambda_svc.py
Read the source to verify the ops list above — dispatch tables and handler functions are the ground truth.