AI Cloud Architect

End-to-end encrypted ML inference with Amazon SageMaker AI and FHE

AWSHow-to by Jonathan Herzog and Ruben MerzAWS Artificial Intelligence Blog

This blog has previously discussed FHE for ML inference in the post Enable fully homomorphic encryption with Amazon SageMaker endpoints for secure, real-time inferencing, but this post goes a little further. That previous post showed how to implement FHE-based inference ‘from scratch’ by hand-crafting a linear-regression algorithm using a low-level library called SEAL. Instead, this post shows a much more flexible and higher-level approach based on concrete-ml, a high-level library built…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to train a concrete-ml FHE model in SageMaker AI, deploy it to an async endpoint, and query it with a client that encrypts and decrypts data so the cloud never sees plaintext.

Who it is for

Architects and developers who must run ML inference on sensitive data in SageMaker AI without exposing plaintext to the cloud.

Key points

  • Requires Python 3.12, Docker, and matching concrete-ml 1.9.0 and concrete-python 2.10.0 versions across all components.
  • AWS says FHE slowdown can reach 100,000X; with quantization and ml.m5.24xlarge the post reports about 500X (46s).
  • Post states FHE is not yet suitable for interactive, latency-sensitive use and does not hide the model itself.