I'm trying to create a bunch of "folders" inside s3 bucket. Was trying to duplicate the same approach as https://github.com/aws/aws-sdk-go/blob/master/service/s3/s3manager/batch_test.go#L742 but this thing expects a "Body" which is not really needed in my case. So far the following code does what I need but I feel like there is a better "batched" approach that can be implemented.
serv := s3.New(session.New(s3h.Config))
for _, i1 := range []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f"} {
for _, i2 := range []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f"} {
req := &s3.PutObjectInput{
Bucket: aws.String(S3_BUCKET),
Key: aws.String(i1 + i2 + "/"),
}
serv.PutObject(req)
}
}
Any pointers?
Thanks!