magento-s3
magento-s3 copied to clipboard
Export is not actually uploading images to s3
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?
@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?
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 Yes should be. Its also requesting the files from the current URL, just the upload doesn't work.
I am also experiencing the same issue.
@thaiphan would be great if you can get back to us about this!
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
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..
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.