-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Current Behavior
We are facing an issue connecting Feast to DynamoDB online store. While running FeastStore.apply() to register the feature views, Feast is trying to create DynamoDB table in the format .<FeatureView.name>. We are running this on AWS and the IAM role we use, does not have dynamodb:CreateTable policy attached to it and is failing with AccessDeniedException that the assumed role is not authorized to perform: dynamdb:CreateTable on resource: xxx. We have a firm wide policy to only enable Dynamo create table access via Terraform. So we tried creating the DynamoDB tables in advance using terraform, but still the FeastStore.apply() looks to create the table even when it exists. Would it be possible to add a check if table exists and do dynamodb_resource.create_table() step only if it doesn't exist?
Expected Behavior
Add DynamoDB table existence check before calling dynamodb_resource.create_table()
Steps to reproduce
- IAM role without dynamodb:CreateTable and dynamodb:DeleteTable policies
- FeatureStore.apply() to register feature views, this will try to create DynamoDB table in the format .<FeatureView.name>
- Step 2 will fail at dynamodb_resource.create_table() step since dynamodb:CreateTable policy does not exist for the assumed role.
Specifications
- Version: 0.53.0
- Platform: AWS
- Subsystem: DynamoDB online store
Possible Solution
Add a check if table exists before dynamodb_resource.create_table() call.
https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/online_stores/dynamodb.py#L220