in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py [0:0]
def get_buckets():
print('List Buckets:')
try:
list_buckets = client['s3']['handle'].list_buckets()['Buckets']
crr_buckets = []
for i in list_buckets:
bucket_response = get_bucket_replication(i['Name'])
if 'ReplicationConfigurationError-' != bucket_response \
and bucket_response['ReplicationConfiguration']['Rules'][0]['Status'] != 'Disabled':
source_buckets.append(i['Name'])
crr_buckets.append(get_source_bucket_arn(i['Name']))
crr_buckets.append(get_replica_bucket_arn(bucket_response))
except Exception as e:
print(e)
raise e
return crr_buckets