Page MenuHomePhabricator

Add a native S3 client
Changes PlannedPublic

Authored by joshuaspence on Sep 21 2014, 9:43 AM.



Fixes T5155. Add a native S3 client that can be used instead of the current external used in rP. This generally gives us a lot more flexibility in how we in invoke the API and allows us to use more advanced features, such as IAM instance profiles.

This diff includes the following changes (I can break this down into smaller chunks if preferred, but seeing as testing this stuff is tricky and manual, it made sense to just lump everything into a single diff):

  • Add support for instance profile credentials to the PhutilAWSFuture class (enabled with ->setUseIAM(true)).
  • Add SSL support to PhutilAWSFuture (enabled with ->setUseSSL(true)).
  • Add a bunch of methods to the PhutilAWSS3Future class.
  • Add a PhutilAWSS3Client which provides around PhutilAWSS3Future and provides a (more convenient) API.
  • Marked a bunch of methods from the PhutilAWSFuture class as final.
Test Plan

I've done some initial testing with the following script:


require_once __DIR__.'/scripts/__init_script__.php';

$client = id(new PhutilAWSS3Client())


Diff Detail

rPHU libphutil
Lint Errors
Errorsrc/future/aws/PhutilAWSFuture.php:206XHP5Use of Undeclared Variable
Warningsrc/future/aws/PhutilAWSFuture.php:145TXT3Line Too Long
Warningsrc/future/aws/PhutilAWSFuture.php:235TXT3Line Too Long
Tests Passed
Build Status
Buildable 3413
Build 3420: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Add a native S3 client.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
hach-que added inline comments.

Setting $this->awsSessionExpiry to null right before comparing it?

Yes. This is still a WIP... I don't really have an easy way to test this stuff, but I expect to come back to it when I do.

Just pulling this back to my queue.