Files
floci/compatibility-tests/sdk-test-python
Marcus Bergo e2aefa654b feat(sagemaker): add SageMaker emulation with Docker-backed training (#1949)
Implement the SageMaker control plane over the AWS JSON 1.1 protocol
(X-Amz-Target: SageMaker.*) plus the runtime invocation path:

- Models, endpoint configs, endpoints, training jobs, and tags with
  AWS-shaped validation errors (ValidationException / ResourceInUse)
- CreateTrainingJob runs the training image as a real Docker container
  using the /opt/ml contract: hyperparameters, resourceconfig and
  inputdataconfig under /opt/ml/input/config, S3 channel data under
  /opt/ml/input/data/<channel>, and /opt/ml/model uploaded back to S3
  as model.tar.gz under the configured S3OutputPath
- CreateEndpoint hosts the model image as a long-lived container with
  the serve command, /ping health checks, and ModelDataUrl artifacts
  extracted into /opt/ml/model
- POST /endpoints/{name}/invocations proxies to the container and maps
  model 5xx responses to ModelError (HTTP 424) like SageMaker Runtime
- Training container logs stream to CloudWatch Logs under
  /aws/sagemaker/TrainingJobs
- Storage wired through StorageFactory with memory/persistent modes,
  config in EmulatorConfig and both application.yml files
- Unit, integration, and Docker-gated integration tests plus a boto3
  compatibility test; service and docs registered in the catalog
2026-09-15 22:31:05 -05:00
..

sdk-test-python

Compatibility tests for Floci using boto3 (1.37.1).

Services Covered

Group Description
ssm Parameter Store — put, get, label, history, path, tags
sqs Queues, send/receive/delete, DLQ, visibility
sns Topics, subscriptions, publish, SQS delivery
s3 Buckets, objects, tagging, copy, batch delete
s3-cors CORS configuration
s3-notifications S3 → SQS event notifications
dynamodb Tables, CRUD, batch, TTL, tags
lambda Create/invoke/update/delete functions
iam Users, roles, policies, access keys
sts GetCallerIdentity, AssumeRole, GetSessionToken
secretsmanager Create/get/put/list/delete secrets, versioning, tags
kms Keys, aliases, encrypt/decrypt, data keys, sign/verify
kinesis Streams, shards, PutRecord/GetRecords
cloudwatch-metrics PutMetricData, ListMetrics, GetMetricStatistics, alarms
cloudformation-naming Auto physical name generation, explicit name precedence, cross-reference
cognito User pools, clients, AdminCreateUser, InitiateAuth, GetUser

Requirements

  • Python 3.9+
  • pip

Running

pip install -r requirements.txt

# All groups
pytest tests/ --junit-xml=test-results/junit.xml

# Specific tests
pytest tests/test_s3.py

# Via just (from compatibility-tests/)
just test-python

Configuration

Variable Default Description
FLOCI_ENDPOINT http://localhost:4566 Floci emulator endpoint

AWS credentials are always test / test / us-east-1.

Docker

docker build -t floci-sdk-python .
docker run --rm --network host floci-sdk-python

# Custom endpoint (macOS/Windows)
docker run --rm -e FLOCI_ENDPOINT=http://host.docker.internal:4566 floci-sdk-python