@@ -260,20 +260,25 @@ def add_notification(
260260 update_required = True
261261
262262 if update_required :
263+ logger .info (
264+ "Put request started to add a NotificationConfiguration for "
265+ + create_formatted_message (bucket , destination_type , destination_arn )
266+ )
263267 existing_bucket_notification_configuration [
264268 f"{ destination_type } Configurations"
265269 ] = existing_notification_configurations_for_type
266270 s3_client .put_bucket_notification_configuration (
267271 Bucket = bucket ,
268272 NotificationConfiguration = existing_bucket_notification_configuration ,
273+ SkipDestinationValidation = True ,
269274 )
270275 logger .info (
271- f "Put request completed to add a NotificationConfiguration for"
276+ "Put request completed to add a NotificationConfiguration for "
272277 + create_formatted_message (bucket , destination_type , destination_arn )
273278 )
274279 else :
275280 logger .info (
276- f "Put not required as an existing NotificationConfiguration already exists for"
281+ "Put not required as an existing NotificationConfiguration already exists for "
277282 + create_formatted_message (bucket , destination_type , destination_arn )
278283 )
279284
@@ -318,16 +323,21 @@ def delete_notification(
318323 f"{ destination_type } Configurations"
319324 ]
320325
326+ logger .info (
327+ "Delete request started to remove a NotificationConfiguration for "
328+ + create_formatted_message (bucket , destination_type , destination_arn )
329+ )
321330 s3_client .put_bucket_notification_configuration (
322331 Bucket = bucket ,
323332 NotificationConfiguration = existing_bucket_notification_configuration ,
333+ SkipDestinationValidation = True ,
324334 )
325335 logger .info (
326- f "Delete request completed to remove a NotificationConfiguration for"
336+ "Delete request completed to remove a NotificationConfiguration for "
327337 + create_formatted_message (bucket , destination_type , destination_arn )
328338 )
329339 else :
330340 logger .info (
331- f "Delete not required as no NotificationConfiguration exists for"
341+ "Delete not required as no NotificationConfiguration exists for "
332342 + create_formatted_message (bucket , destination_type , destination_arn )
333343 )
0 commit comments