Skip to content

Commit 0a951ce

Browse files
authored
fix: Skip tag updates if user do not have permissions (#5673)
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
1 parent e0b698d commit 0a951ce

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

sdk/python/feast/infra/online_stores/dynamodb.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,18 @@ def update(
249249
# tags won't be updated in the create_table call if the table already exists
250250
if do_tag_updates[table_name]:
251251
tags = self._table_tags(online_config, table_instance)
252-
self._update_tags(dynamodb_client, table_name, tags)
252+
try:
253+
self._update_tags(dynamodb_client, table_name, tags)
254+
except ClientError as ce:
255+
# If tag update fails with AccessDeniedException, log warning and continue
256+
# This allows Feast to work in environments where IAM roles don't have
257+
# dynamodb:TagResource and dynamodb:UntagResource permissions
258+
if ce.response["Error"]["Code"] == "AccessDeniedException":
259+
logger.warning(
260+
f"Unable to update tags for table {table_name} due to insufficient permissions."
261+
)
262+
else:
263+
raise
253264

254265
for table_to_delete in tables_to_delete:
255266
_delete_table_idempotent(

0 commit comments

Comments
 (0)