Skip to content

Commit 7d2c2b4

Browse files
author
Scot Kronenfeld
committed
Fix detection of existing tags when updating a function. Tags key is not present if there are no existing tags
1 parent b866652 commit 7d2c2b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws_lambda/aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def update_function(
640640
key: str(value)
641641
for key, value in cfg.get('tags').items()
642642
}
643-
if tags != existing_cfg['Tags']:
643+
if tags != existing_cfg.get('Tags'):
644644
client.untag_resource(Resource=ret['FunctionArn'],
645645
TagKeys=list(existing_cfg['Tags'].keys()))
646646
client.tag_resource(Resource=ret['FunctionArn'], Tags=tags)

0 commit comments

Comments
 (0)