Warning: This is an experimental feature. It's intended for early testing and feedback, and could change without warnings in future releases.
To enable this feature, runfeast alpha enable aws_lambda_feature_server
Overview
The AWS Lambda feature server is an HTTP endpoint that serves features with JSON I/O, deployed as a Docker image through AWS Lambda and AWS API Gateway. This enables users to get features from Feast using any programming language that can make HTTP requests. A local feature server is also available. A remote feature server on GCP Cloud Run is currently being developed.
Deployment
The AWS Lambda feature server is only available to projects using the AwsProvider with registries on S3. It is disabled by default. To enable it, feature_store.yaml must be modified; specifically, the enable flag must be on and an execution_role_name must be specified. For example, after running feast init -t aws, changing the registry to be on S3, and enabling the feature server, the contents of feature_store.yaml should look similar to the following:
If enabled, the feature server will be deployed during feast apply. After it is deployed, the feast endpoint CLI command will indicate the server's endpoint.
Example
After feature_store.yaml has been modified as described in the previous section, it can be deployed as follows:
$feastapply10/07/202103:57:26PMINFO:Pullingremoteimagefeastdev/feature-server:aws:10/07/202103:57:28PMINFO:CreatingremoteECRrepositoryfeast-python-server-key_shark-0_13_1_dev23_gb3c08320:10/07/2021 03:57:29 PM INFO:Pushing local image to remote 402087665549.dkr.ecr.us-west-2.amazonaws.com/feast-python-server-key_shark-0_13_1_dev23_gb3c08320:0_13_1_dev23_gb3c08320:
10/07/202103:58:44PMINFO:Deployingfeatureserver...10/07/202103:58:45PMINFO:CreatingAWSLambda...10/07/202103:58:46PMINFO:CreatingAWSAPIGateway...Registeredentitydriver_idRegisteredfeatureviewdriver_hourly_statsDeployinginfrastructurefordriver_hourly_stats$feastendpoint10/07/202103:59:01PMINFO:Featureserverendpoint:https://hkosgmz4m2.execute-api.us-west-2.amazonaws.com$feastmaterialize-incremental $(date+%Y-%m-%d)Materializing1featureviewsto2021-10-0617:00:00-07:00intothedynamodbonlinestore.driver_hourly_statsfrom2020-10-0823:01:34-07:00to2021-10-0617:00:00-07:00:100%|█████████████████████████████████████████████████████████████████|5/5 [00:00<00:00, 16.89it/s]
After the feature server starts, we can execute cURL commands against it: