If you see this error after migrating from the v2 to v3 sdk change:
$s3client->deleteObjects( array(
'Bucket' => $settings['bucket'],
'Objects' => $fileKeys
) );
to:
$s3client->deleteObjects( array(
'Bucket' => $settings['bucket'],
'Delete' => array(
'Objects' => $fileKeys
)
) );
Note the new Delete array wrapping Objects. I discovered this while updating BackupBuddy.
1. Download the root certificate (bundle) here.
2. Download the intermediate certificate for YOUR instance’s region here.
Open both files in a text editor. Copy the contents of the intermediate certificate to the TOP of the root certificate above the existing contents.
Point Sequel Pro to this file hen selecting the “Key file”. Leave other SSL options blank except for the checkbox enabling SSL.
If you do this wrong you will get an error like:
SSL connection error: ASN: bad other signature confirmation
Catchable fatal error: Argument 2 passed to Guzzle\Service\Client::getCommand() must be of the type array, string given, called in ../_s3lib2/Guzzle/Service/Client.php on line 76 and defined in ../_s3lib2/Guzzle/Service/Client.php on line 79
If you’re getting this error when working with the version 2 PHP SDK for Amazon Web Services’ S3 service, fear not. It’s probably as simple as you passing the wrong parameters into the function. In this example I was calling listObjects() using the old SDK’s parameters rather than the new SDK’s. Simply fix!
Wrong (eg. old SDK v1 way):
$response = self::$_client->listObjects( $settings['bucket'] );
Right (eg. new SDK v2 way):
$response = self::$_client->listObjects( array( 'Bucket' => $settings['bucket'], 'Prefix' => $prefix ) );
All fixed!
Amazon Web Service’s default nginx configuration does not have websocket support enabled by default. I am running SailsJS with Socket.io on NodeJS with the default nginx proxy and discovered that websockets were failing to connect. Creating a directory named .ebextensions in the root of my application and a file named 01_files.config within it with the configuration below solved the problem as it instructs nginx to pass websockets through. Just drop this in, deploy your app, and you should be good to go with your websockets functioning.
.ebextensions/01_files.config contents:
files:
"/etc/nginx/conf.d/websocketupgrade.conf" :
mode: "000755"
owner: root
group: root
content: |
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
I searched high and low for a solution to this problem and after finding several similar but functioning solutions I combined them to get the above.
Dustin Bolton – Software Engineer, Web & WordPress Developer