This error is displayed when running the S3 Test on the Admin page (/admin/media_mover/mm_s3/test)
user warning: S3::putBucket(mybucket_test, public-read, ): [6] Couldn't resolve host 'mybucket_test.s3.amazonaws.com' in /www/stage/htdocs/community/sites/all/modules/media_mover/contrib/mm_s3/S3.php on line 236.
The problem is that Amazon S3 does not allow underscores in the filename or foldername.
mm_s3_test.inc has this for line 17:
$test_bucket = variable_get('mm_s3_bucket', str_replace(" ", "_", $conf['site_name'])) .'_test';
Replace both underscores with a dash and the test works fine.
$test_bucket = variable_get('mm_s3_bucket', str_replace(" ", "-", $conf['site_name'])) .'-test';
Comments
Comment #1
arthurf commentedActually, I'm not sure that you're right about the underscores- I can create buckets with underscores without issues, I think there maybe something else going on here. Likely the admin directory check isn't working- I've just don some updates on the D6 branch to solve some of the validation issues around this.