def put_replication(Bucket, Role, Rules, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  Role = _get_role_arn(name=Role, region=region, key=key, keyid=keyid, profile=profile)
  if (Rules is None):
   Rules = []
  elif isinstance(Rules, six.string_types):
   Rules = json.loads(Rules)
  conn.put_bucket_replication(Bucket=Bucket, ReplicationConfiguration={'Role': Role, 'Rules': Rules})
  return {'updated': True, 'name': Bucket}
 except ClientError as e:
  return {'updated': False, 'error': __utils__['boto3.get_error'](e)}

def put_replication ( Bucket , Role , Rules , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) Role = _get_role_arn ( name = Role , region = region , key = key , keyid = keyid , profile = profile ) if ( Rules is None ) : Rules = [ ] elif isinstance ( Rules , six . string_types ) : Rules = json . loads ( Rules ) conn . put_bucket_replication ( Bucket = Bucket , ReplicationConfiguration = { 'Role' : Role , 'Rules' : Rules } ) return { 'updated' : True , 'name' : Bucket } except ClientError as e : return { 'updated' : False , 'error' : __utils__ [ 'boto3.get_error' ] ( e ) }
given a valid config .