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
243243 Returns:
244244 list of buckets
245245
246- Raises:
247- s3_client.exceptions.ClientError: Error trying to get S3 buckets
248- ClientError: Error trying to get S3 buckets
249246 """
250247 LOGGER .info ("Getting all buckets" )
251248 buckets : list = []
@@ -512,7 +509,7 @@ def check_proactive_engagement_enabled(shield_client: ShieldClient, params: dict
512509 if proactive_engagement_status == "ENABLED" : # noqa R505
513510 return True
514511 elif proactive_engagement_status == "DISABLED" :
515- return False
512+ return True
516513 elif proactive_engagement_status == "PENDING" :
517514 sleep (5 )
518515 check_proactive_engagement_enabled (shield_client , params , retry + 1 )
@@ -675,6 +672,7 @@ def enable_proactive_engagement(shield_client: ShieldClient, params: dict) -> No
675672 if params ["SHIELD_ENABLE_PROACTIVE_ENGAGEMENT" ] == "true" :
676673 if check_proactive_engagement_enabled (shield_client , params ):
677674 update_emergency_contacts (shield_client , params )
675+ shield_client .enable_proactive_engagement ()
678676 else :
679677 if check_emergency_contacts (shield_client ):
680678 update_emergency_contacts (shield_client , params )
You can’t perform that action at this time.
0 commit comments