File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
aws_sra_examples/solutions/shield_advanced/shield_advanced/lambda/src Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -243,9 +243,6 @@ def get_buckets_to_protect(account_session: boto3.Session, buckets_in_account: l
243
243
Returns:
244
244
list of buckets
245
245
246
- Raises:
247
- s3_client.exceptions.ClientError: Error trying to get S3 buckets
248
- ClientError: Error trying to get S3 buckets
249
246
"""
250
247
LOGGER .info ("Getting all buckets" )
251
248
buckets : list = []
@@ -512,7 +509,7 @@ def check_proactive_engagement_enabled(shield_client: ShieldClient, params: dict
512
509
if proactive_engagement_status == "ENABLED" : # noqa R505
513
510
return True
514
511
elif proactive_engagement_status == "DISABLED" :
515
- return False
512
+ return True
516
513
elif proactive_engagement_status == "PENDING" :
517
514
sleep (5 )
518
515
check_proactive_engagement_enabled (shield_client , params , retry + 1 )
@@ -675,6 +672,7 @@ def enable_proactive_engagement(shield_client: ShieldClient, params: dict) -> No
675
672
if params ["SHIELD_ENABLE_PROACTIVE_ENGAGEMENT" ] == "true" :
676
673
if check_proactive_engagement_enabled (shield_client , params ):
677
674
update_emergency_contacts (shield_client , params )
675
+ shield_client .enable_proactive_engagement ()
678
676
else :
679
677
if check_emergency_contacts (shield_client ):
680
678
update_emergency_contacts (shield_client , params )
You can’t perform that action at this time.
0 commit comments