Skip to content

Commit

Permalink
Remove aws internal tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Aug 21, 2024
1 parent 105dc3f commit 8c7908e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sky/provision/aws/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,13 @@ def _create_node_tag(target_instance, is_head: bool = True) -> str:
'Key': 'Name',
'Value': f'sky-{cluster_name_on_cloud}-worker'
})
# Remove AWS internal tags, as they are not allowed to be set by users.
target_instance_tags = [
tag for tag in target_instance.tags if not tag['Key'].startswith('aws:')
]
ec2.meta.client.create_tags(
Resources=[target_instance.id],
Tags=target_instance.tags + node_tag,
Tags=target_instance_tags + node_tag,
)
return target_instance.id

Expand Down

0 comments on commit 8c7908e

Please sign in to comment.