@sync_performer
def perform_copy_s3_keys(dispatcher, intent):
 s3 = boto.connect_s3()
 source_bucket = s3.get_bucket(intent.source_bucket)
 for key in intent.keys:
  source_key = source_bucket.get_key((intent.source_prefix + key))
  destination_metadata = source_key.metadata
  for (extention, content_type) in EXTENSION_MIME_TYPES.items():
   if key.endswith(extention):
    destination_metadata['Content-Type'] = content_type
    break
  source_key.copy(dst_bucket=intent.destination_bucket, dst_key=(intent.destination_prefix + key), metadata=destination_metadata)

@ sync_performer def perform_copy_s3_keys ( dispatcher , intent ) : s3 = boto . connect_s3 ( ) source_bucket = s3 . get_bucket ( intent . source_bucket ) for key in intent . keys : source_key = source_bucket . get_key ( ( intent . source_prefix + key ) ) destination_metadata = source_key . metadata for ( extention , content_type ) in EXTENSION_MIME_TYPES . items ( ) : if key . endswith ( extention ) : destination_metadata [ 'Content-Type' ] = content_type break source_key . copy ( dst_bucket = intent . destination_bucket , dst_key = ( intent . destination_prefix + key ) , metadata = destination_metadata )
see :class:copys3keys .