AWS Greengrass allows running machine learning inference models locally on edge devices by (1) compiling common ML frameworks to run on devices, (2) deploying pretrained models from AWS services like SageMaker, and (3) invoking the models from Lambda functions on the edge device without connecting to the cloud. This enables tasks like image classification using cameras without transmitting data to the cloud.