Jump to content

Module: Amazon S3 / Cloudfront


zyON
 Share

Recommended Posts

Hi, @skovar!

In the end, I decided to not use the module on the project I was working on because some requirements changed, but I think it's working, but I didn't try it with the latest version of PW.

What I mean is that with my pull request, the module can upload the image variations.

Edited by Sérgio Jardim
Clarify
Link to comment
Share on other sites

  • 8 months later...

Can confirm it works on PW3 too, I had some issues with the included AWS SDK: 

Quote

Error: Exception: Error: File not Added to S3: [curl] 77: error setting certificate verify locations: CAfile: /***/site/assets/cache/FileCompiler/site/modules/AmazonS3Cloudfront/aws/Guzzle/Http/Resources/cacert.pem CApath: none https://***/1/logo-white.150x0.png (in /***/site/assets/cache/FileCompiler/site/modules/AmazonS3Cloudfront/AmazonS3Cloudfront.module line 127)

So just for trying something out because I couldn't figure out anything from the error, I switched to installing the Amazon SDK through composer to get the latest version of the SDK and I basically just had to change how the S3 client is initialized.

$this->client = new S3Client([
            'version'     => 'latest', //Hardcoded value, think this has to do with the SDK version?
            'region'      => 'us-east-2', //Hard coded value for now, could be a config field
            'credentials' => [
                'key'    => $this->s3_key,
                'secret' => $this->s3_secret,
            ],
]);

Also removed the require_once for the included SDK.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...