Amazon makes changes to it's APIs and they're not always backwards compatible. See http://developer.amazonwebservices.com/connect/thread.jspa?messageID=789...

We should have some mechanism to allow userland modules to specify which API version they want to use, and a way for the APIs to support different versions of API function calls and responses.

Comments

dragonwize’s picture

Modules will be able to pick their API version by parameter. The change in SQS API is determined by what API you specify. That should be, along with every other option, passed on to the module developers.

The old SQS had a REST and SOAP API. The new version no longer has the REST API but instead has the Query API. With both the Query API and the SOAP API you specify the WSDL version.

See: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=114...

dragonwize’s picture

Going through your ec2 module I've noticed you have put the API into the hands of the end user as an admin option and not let the modules that will be extending the service control the API.

One of the most important goals I have for these modules if for them to offer the complete service to the module developers. I don't want to dumb down the service in any way. If the module developers do not have the full power and features of the service, these modules will be useless and will not be used. ALL features and functions of the services should be able to be controlled these modules. These modules are here just to lighten the load of the developer not hinder them.

That being said, I do see a market for easier use of some of these services. But I believe those are better left to other modules that extend these modules. For example I plan to write a S3 Simple module that will use the S3 API with a really easy to use system and interface. Obviously that will dumb down the service and full features won't be available but that module will be extending this module.

Anonymous’s picture

Not sure that I understand what you mean completely. There aren't any permission checks in the API itself, only the end user module. The API does define a set of permissions for creating and deleting instances but it leaves it up to the end user module to use them in access checks (instead of creating their own permission, which they can still do if they really wanted to).

You probably have a good idea that I'm missing so please elaborate!

Cheers

dragonwize’s picture

I am basically agreeing with your original post. For example, a function from your aws_ec2.module:

function aws_ec2_createKeyPair($keyName) {
  $host = variable_get('aws_ec2_host', 'ec2.amazonaws.com');
  $request = array(
    'Action' => 'CreateKeyPair',
    'KeyName' => $keyName,
    'Version' => variable_get('ec2_api_version', '2007-08-29'),
  );
  return aws_queryRequest($host, $request);
}

In this function the Amazon API version is delegated to the end user of the module and affects all modules that extend it. The API version, along with ALL of features of the service, should be available to the extending modules. In this example, that means there needs to be a way to set the API version in the function parameters.

The API version doesn't matter to the end user much. I would either take out the admin option to set the API version or change it to be a Default API version that extending modules will be able to override. I have done this for S3 with a default bucket.

dragonwize’s picture

Title: Make APIs "version aware" » Ensure modules are API "version aware"
Category: feature » task
Anonymous’s picture

dragonwize - sorry to have been so quiet on this. I'm just waiting to get access to the major new api (persistent storage) and will then update the EC2 api & console module to fully support versions.

Cheers

dragonwize’s picture

No problem simonc. I have been busy myself and have not been able to put much time in lately.

davisben’s picture

Version: » 2.0.x-dev
Issue summary: View changes
davisben’s picture

Status: Active » Fixed

The 2.0.x version of this module allows for a specific API version to be chosen for each service.

Status: Fixed » Closed (fixed)

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