tier storage: support downloading the remote dat files

This commit is contained in:
Chris Lu
2019-12-25 09:53:13 -08:00
parent 3ebeae0c0b
commit d960b3474a
11 changed files with 775 additions and 256 deletions

View File

@@ -52,3 +52,11 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region string) (s3iface.S
return t, nil
}
func deleteFromS3(sess s3iface.S3API, sourceBucket string, sourceKey string) (err error) {
_, err = sess.DeleteObject(&s3.DeleteObjectInput{
Bucket: aws.String(sourceBucket),
Key: aws.String(sourceKey),
})
return err
}