2017 © Pedro Peláez
 

library yii2-aws-sdk

Yii2 AWS Sdk v3 wrapper.

image

jenn0pal/yii2-aws-sdk

Yii2 AWS Sdk v3 wrapper.

  • Friday, July 10, 2015
  • by jenn0pal
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,408 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

# Yii2 AWS SDK v3 wrapper

Yii2 AWS Sdk V3 wrapper, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require jenn0pal/yii2-aws-sdk "*"

or add, (*4)

"jenn0pal/yii2-aws-sdk": "*"

to the require section of your composer.json file., (*5)

in your web.php, your configuration would look like this, (*6)

'components' => [
    'aws' => [
        'class' => 'jenn0pal\aws\BaseAws',
        //required config
        'region' => 'your_region',
        //optional config
        'key' => 'your_key',
        'secret' => 'your_secret',
        'version' => 'latest',
        //additional config
        'options' => [
            'scheme' => 'http',
        ],
        // optional config file
        //'configFile' => require_once('/path/to/aws.config.php'),
    ]
]

See additional aws configuration here, (*7)

Warning! It is not recommended to hard code your credentials on your app config because you may accidentally commit it in your VCS, potentially exposing it to more people than intended. See additional ways here, (*8)

Usage

Once the extension is installed, simply use it in your code by :, (*9)

/* @var $aws \jenn0pal\aws\AwsSdk */
$aws = \Yii::$app->aws;
$dynamoDbClient = $aws->createDynamoDb();
...
$s3Client = $aws->createS3();
$result = $s3Client->listObjects(['Bucket' => 'my-bucket'])->toArray();
//get the last object
$object = end($result['Contents']);
$key = $object['Key'];
$file = $s3Client->getObject([
  'Bucket' => 'my-bucket',
  'Key' => $key
]);

//download file
header('Content-Type: ' . $file['ContentType']);
echo $file['Body'];

The Versions

10/07 2015

dev-master

9999999-dev

Yii2 AWS Sdk v3 wrapper.

  Sources   Download

MIT

The Requires

 

by Ray Jonathan Palpallatoc

yii2 wrapper aws sdk

10/07 2015

1.0.1.x-dev

1.0.1.9999999-dev

Yii2 AWS Sdk v3 wrapper.

  Sources   Download

MIT

The Requires

 

by Ray Jonathan Palpallatoc

yii2 wrapper aws sdk

09/07 2015

1.0.1

1.0.1.0

Yii2 AWS Sdk v3 wrapper.

  Sources   Download

MIT

The Requires

 

by Ray Jonathan Palpallatoc

yii2 wrapper aws sdk

09/07 2015

1.0.0.x-dev

1.0.0.9999999-dev

Yii2 AWS Sdk v3 wrapper.

  Sources   Download

MIT

The Requires

 

by Ray Jonathan Palpallatoc

yii2 wrapper aws sdk

09/07 2015

1.0.0

1.0.0.0

Yii2 AWS Sdk v3 wrapper.

  Sources   Download

MIT

The Requires

 

by Ray Jonathan Palpallatoc

yii2 wrapper aws sdk