Refactors existing s3 bucket scripts indexToBucket and bucketToIndex such that the logic is available from the generic node_modules dir. This then allows us to expose an /annotate/s3 endpoint for the annotation service which will be used to annotate buckets. The logic being refactored in this PR is used to copy the contents of an s3 bucket to an ES index before then annotating as usual. Once the annotation has finished, we copy the index back to the specified output bucket.
Refactors existing s3 bucket scripts indexToBucket and bucketToIndex such that the logic is available from the generic node_modules dir. This then allows us to expose an
/annotate/s3
endpoint for the annotation service which will be used to annotate buckets. The logic being refactored in this PR is used to copy the contents of an s3 bucket to an ES index before then annotating as usual. Once the annotation has finished, we copy the index back to the specified output bucket.closes #179