* you need "AWS SDK for PHP 2" when you want work with Glacier

I created a sandbox http://drupal.org/sandbox/tobiasb/1865566 todo this.

Comments

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

Where are you getting AWSSDK 2? http://drupalcode.org/sandbox/tobiasb/1865566.git/blob/refs/heads/awssdk... that url doesn't work.

tobiasb’s picture

boombatower’s picture

hmm swear that didn't work yesterday :)

Definitely something we should support if possible.

gilgabar’s picture

Status: Postponed (maintainer needs more info) » Active

I am using tobiasb's sandbox version and it appears to work fine (for my limited use case anyway). I did update it to add a variable for a region, but otherwise it seems great.

tobiasb’s picture

I am using it in this "project" http://drupal.org/sandbox/tobiasb/1899770 . And perhaps we should also add in the API a small function which does the same like this one http://drupalcode.org/sandbox/tobiasb/1899770.git/blob/refs/heads/as_ent...

loze’s picture

Im trying to use tobiasb's module for AWS SDK for PHP 2
http://drupal.org/sandbox/tobiasb/1865566 but i cant seem to get the library to load. I've put the sdk files in the libraries/awssdk folder, cleared caches.
my status page still says "Please make sure the AWSSDK library is installed in the libraries directory."

any suggestions?

tobiasb’s picture

You need to download the SDK (via drush make or git clone [1]) and the run the composer ([2]) in the SDK. ;-)

[1] https://github.com/aws/aws-sdk-php
[2] https://drupal.org/project/composer

cloudbull’s picture

Cloning into 'aws_sdk_for_php_2'...
remote: Counting objects: 335, done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 335 (delta 189), reused 279 (delta 155)
Receiving objects: 100% (335/335), 40.83 KiB, done.
Resolving deltas: 100% (189/189), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

The sandbox project cannot download, please help ~

tobiasb’s picture

This is your command:

git clone --branch awssdkforphp2 http://git.drupal.org/sandbox/tobiasb/1865566.git

jimmyko’s picture

Issue tags: +Need tests
StatusFileSize
new11.2 KB

I have downloaded the sandbox of tobiasb and tried. It works perfectly. I added the installation guide in README and packaged as a patch here.

cloudbull’s picture

Hi there, i tried to load aws sns service:

http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.Sns.SnsClient....

by $sns = awssdk_get_client('sns');

the result not really match the api document.

For example, the output array got AddPermission / GetTopic etc while it dont have new services like CreatePlatformApplicaton ~~

Please kindly advice

thanks
Keith

jimmyko’s picture

StatusFileSize
new11.18 KB

I have updated the aws sdk for php 2 version to the latest 2.4.7 in patch, which should support the SNS services now.

cloudbull’s picture

StatusFileSize
new1.06 KB

Added region support in awssdk_get_client

E.g. $sns = awssdk_get_client('sns', 'TOKYO');

Tested it is working ~ :)

jimmyko’s picture

For those who are interested in using the apply the patch in #1865568-12: Add support for AWS SDK for PHP 2. Please git clone the project and git checkout 4c9204d. This patch is based on this commit.

Please be aware that the patch in #1865568-13: Add support for AWS SDK for PHP 2 is dependent on the one in #1865568-12: Add support for AWS SDK for PHP 2

loze’s picture

Ive successfully patched the module as described in #14 and successfully installed the library with composer
but I get the following error when trying to enable amazons3 or amazons3_cors. any suggestions?


Module amazons3 cannot be enabled because it depends on awssdk [error]
(>=5.1) but is available

jimmyko’s picture

The error you have is due to missing version attributes in .info file of awssdk module. I believe you have followed my guide and checkout particular commit from git. This is the reason why there is no version infomation. You can add "version=5.2" in .info file to fix this.

For your information, amazons3 does not support aws sdk for php 2 right now.

cloudbull’s picture

Issue summary: View changes
Status: Active » Fixed

Hi all,

My working project need lots of features in AWSSDK v2 and this request already lasted a year. I here suggest to put it on github to avoid duplication in drupal.org, as i see there are many proejcts depends on awssdk.

Here is the link: https://github.com/drucloud/drupal-awssdkv2

And my team will keep maintain the source.

Thanks
Keith

infines’s picture

@keithyau Using your module, what version of AWS SDK for php do we download? Do we just download the zip from the github page? Or do we need to download something else?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cloudbull’s picture

#18

You should use AWS SDK v2, better install with composer. http://aws.amazon.com/sdkforphp/

after download, you need to install the sdk to "libraries" folder. And the module can load it by "libraries_load"

cloudbull’s picture

StatusFileSize
new1.58 KB

Added support for setting up region in UI

tobiasb’s picture

Status: Closed (fixed) » Active

The feature request is not resolved with a git repo @github ;-). We do not want a new full project for "AWS SDK for PHP 2", or we want?

cloudbull’s picture

Agree #22, shall we start a new project, or it will have a update in this project ?

sheldonkreger’s picture

It looks my team is going to need this. Has any decision been made on how to proceed?

cloudbull’s picture

well, my opinion is using the module i put on github until the decision been made.

https://github.com/drucloud/drupal-awssdkv2

And I just made a S3 support for sdk v2, you may need this as well ~
https://github.com/drucloud/drupal-awss3-v2
https://drupal.org/node/2176589

enjoy ~

tomogden’s picture

@keithyau, thank you for your diligence in making this happen.

I have loaded the awssdk repo from https://github.com/drucloud/drupal-awssdkv2 and ran the makefile, but the module cannot seem to find the new SDK in the library directory.

I checked, and the SDK seems to be installed in the library and in good order. However, I wonder why the awssdk.module:line 27 is looking for a file at 'vendor/autoload.php'? Shouldn't it be looking for the autoload file in the 'build' directory?

tobiasb’s picture

@tomogden You need also run the composer command, which creates the vendor/autoload.php.

tomogden’s picture

That did it, thank you @tobiasb.

To be more clear, it might be helpful to express the steps below, especially for those users where makefiles or Composer may be unfamiliar.

Installing the SDK

  1. Use the AWS SDK module makefile to install the SDK from Amazon. From your site's root directory:
    drush make sites/all/modules/awssdk/awssdk.make
  2. Install the latest version of Composer, which will work within Drush:
    drush dl composer-8.x
  3. Change directories to the location of the composer.json file in the the SDK at /sites/all/libraries/awssdk:
    cd sites/all/libraries/awssdk
  4. Use Composer to download and install dependencies within the SDK to work with the AWS SDK module:
    drush composer install

How does this look?

tobiasb’s picture

Looks fine. I added the install steps to the sandbox page.

Wouter_Coppens’s picture

What are the plans to get AWS SDK v2 supported?

The AWS SDK is now at version 2.5.2 and it was originally released more then a year ago. https://aws.amazon.com/releasenotes/5321611619531391

tobiasb’s picture

I rewrite the module and create a new project.

tobiasb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mark_schaal’s picture

Is tobiasb's https://drupal.org/project/awssdk2 the official replacement for awssdk for version 2 now? Or should we still be using the github repository to deploy the module?

mike503’s picture

Issue tags: -

^ I have the same question. Is that preferred for v2?

tobiasb’s picture

Yes. btw. please re-open a issue when you want that somebody see your comments as new. ;-)

But https://drupal.org/project/awssdk2 is complete differently as this one. But just read the readme, to find out. how to use it.

yaworsk’s picture

Status: Closed (fixed) » Active

Can we add the disclaimer regarding https://drupal.org/project/awssdk2 to the project info to avoid people digging?

mark_schaal’s picture

Thanks tobiasb!