magento-s3 icon indicating copy to clipboard operation
magento-s3 copied to clipboard

Export is not actually uploading images to s3

Open kgoedecke opened this issue 6 years ago • 8 comments

I configured the extension with s3_config.php and it seemed to work just fine. Even the export process throws no errors and shows the upload of multiple files.

...
Uploading catalog/product/0/3/0319.2.jpg to S3.
Uploading catalog/product/0/3/0313.0.jpg to S3.
Uploading catalog/product/0/3/0310.9_dr.x.jpg to S3.
Uploading catalog/product/0/3/x.jpg to S3.
Uploading catalog/product/0/3/zda.jpg to S3.
Uploading catalog/product/0/3/0344.4.jpg to S3.
...

But then no files are actually in the S3 bucket. Is there any way to debug this?

kgoedecke avatar Oct 03 '18 10:10 kgoedecke

@thaiphan additionally my uploads are not being uploaded to S3 after activating the plugin. I dont get any error messages. The credentials have full S3 access. Any ideas what the issue could be?

kgoedecke avatar Oct 04 '18 10:10 kgoedecke

Hi @kgoedecke,

In the AWS Console, are you in the correct region? If you're in the wrong region, you might not see your bucket or files.

Regards,

Thai

thaiphan avatar Oct 15 '18 12:10 thaiphan

@thaiphan Yes should be. Its also requesting the files from the current URL, just the upload doesn't work.

kgoedecke avatar Oct 19 '18 14:10 kgoedecke

I am also experiencing the same issue.

neps-in avatar Nov 17 '18 06:11 neps-in

@thaiphan would be great if you can get back to us about this!

kgoedecke avatar Nov 21 '18 14:11 kgoedecke

I'm having the same issue here. I did a bit of searching and found a log file at [magento]/var/log/exception.log

at /home/ubuntu/magento/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"} []
[2018-12-24 23:11:34] main.CRITICAL: Error executing "PutObject" on "https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg"; AWS HTTP error: Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD1183D7778C</RequestId><HostId>bey0HzUETzXVwOVYxgvR7/4rmVpOFVgh2vSurpghDuMSX9KwopyWCKHaMNZeeHCChKCljQ1Xyj4=</HostId></Error> {"exception":"[object] (Aws\\S3\\Exception\\S3Exception(code: 0): Error executing \"PutObject\" on \"https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg\"; AWS HTTP error: Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
AccessDenied (client): Access Denied - <?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD1183D7778C</RequestId><HostId>bey0HzUETzXVwOVYxgvR7/4rmVpOFVgh2vSurpghDuMSX9KwopyWCKHaMNZeeHCChKCljQ1Xyj4=</HostId></Error> at /home/ubuntu/magento/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:191, GuzzleHttp\\Exception\\ClientException(code: 403): Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
at /home/ubuntu/magento/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"} []

I've used a profile with permissions to this specific bucket as well as trying the main admin one as per the documentation -- no change.

I'm using the following command to try again which brings up the error again: php -f bin/magento s3:storage:disable && php -f bin/magento s3:storage:export

Tom-T avatar Dec 25 '18 15:12 Tom-T

Same here (Magento 1.9.3.x). Can this be related to issue #4? :thinking: Because if so, then the PR #17 it's a possible solution..

ivanaugustobd avatar Jan 28 '19 19:01 ivanaugustobd

I was having this problem.

When I created the bucket, by default it's not allowing public objects, I changed this configuration and now it's working.

vincequeiroz avatar Apr 22 '19 14:04 vincequeiroz