2017 © Pedro PelĂĄez
 

library aws-sdk-php-laravel

A simple Laravel 5 service provider for including the AWS SDK for PHP.

image

aws/aws-sdk-php-laravel

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  • Thursday, November 16, 2017
  • by jeremeamia
  • Repository
  • 85 Watchers
  • 1006 Stars
  • 3,658,102 Installations
  • PHP
  • 36 Dependents
  • 0 Suggesters
  • 150 Forks
  • 9 Open issues
  • 23 Versions
  • 8 % Grown

The README.md

AWS Service Provider for Laravel 5 - 11

Latest Stable Version Total Downloads Gitter, (*1)

This is a simple Laravel service provider for making it easy to include the official AWS SDK for PHP in your Laravel and Lumen applications., (*2)

This README is for version 3.x of the service provider, which is implemented to work with Version 3 of the AWS SDK for PHP and Laravel 5.1., (*3)

Major Versions:, (*4)

  • 3.x (YOU ARE HERE) - For laravel/framework:6.0|7.0|8.0|9.0|10.0|11.0 and aws/aws-sdk-php:^3.279.0
  • 2.x (2.0 branch) - For laravel/framework:5.0.* and aws/aws-sdk-php:~2.4
  • 1.x (1.0 branch) - For laravel/framework:4.* and aws/aws-sdk-php:~2.4

Jump To: * Getting Started * Getting Help * Contributing * More Resources, (*5)

Getting Started

Installation

The AWS Service Provider can be installed via Composer by requiring the aws/aws-sdk-php-laravel package in your project's composer.json., (*6)

{
    "require": {
        "aws/aws-sdk-php-laravel": "~3.0"
    }
}

Then run a composer update, (*7)

php composer.phar update

To use the AWS Service Provider, you must register the provider when bootstrapping your application., (*8)

Lumen

In Lumen find the Register Service Providers in your bootstrap/app.php and register the AWS Service Provider., (*9)

    $app->register(Aws\Laravel\AwsServiceProvider::class);

Laravel

In Laravel find the providers key in your config/app.php and register the AWS Service Provider., (*10)

    'providers' => array(
        // ...
        Aws\Laravel\AwsServiceProvider::class,
    )

Find the aliases key in your config/app.php and add the AWS facade alias., (*11)

    'aliases' => array(
        // ...
        'AWS' => Aws\Laravel\AwsFacade::class,
    )

Configuration

By default, the package uses the following environment variables to auto-configure the plugin without modification:, (*12)

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION (default = us-east-1)

To customize the configuration file, publish the package configuration using Artisan., (*13)

php artisan vendor:publish  --provider="Aws\Laravel\AwsServiceProvider"

The settings can be found in the generated config/aws.php configuration file. By default, the credentials and region settings will pull from your .env file., (*14)

return [
    'credentials' => [
        'key'    => env('AWS_ACCESS_KEY_ID', ''),
        'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
    ],
    'region' => env('AWS_REGION', 'us-east-1'),
    'version' => 'latest',
    // You can override settings for specific services
    'Ses' => [
        'region' => 'us-east-1',
    ],
];

Note that you can always delete the credentials line from this file if you'd like to use the default SDK Configuration Provider chain instead., (*15)

Referring Laravel 5.2.0 Upgrade guide, you must using config file instead of environment variable option if using php artisan config:cache., (*16)

Learn more about configuring the SDK on the SDK's User Guide., (*17)

Usage

In order to use the AWS SDK for PHP within your app, you need to retrieve it from the Laravel Service Container. The following example uses the Amazon S3 client to upload a file., (*18)

$s3 = App::make('aws')->createClient('s3');
$s3->putObject(array(
    'Bucket'     => 'YOUR_BUCKET',
    'Key'        => 'YOUR_OBJECT_KEY',
    'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
));

If the AWS facade is registered within the aliases section of the application configuration, you can also use the following technique., (*19)

$s3 = AWS::createClient('s3');
$s3->putObject(array(
    'Bucket'     => 'YOUR_BUCKET',
    'Key'        => 'YOUR_OBJECT_KEY',
    'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
));

To use in Lumen, you need to retrieve it from the service container a bit differently:, (*20)

$s3 = app('aws')->createClient('s3');
$s3->putObject(array(
    'Bucket'     => 'YOUR_BUCKET',
    'Key'        => 'YOUR_OBJECT_KEY',
    'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
));

Getting Help

Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them., (*21)

This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums., (*22)

Opening Issues

If you encounter a bug with aws-sdk-php-laravel we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of aws-sdk-php-laravel, PHP version and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too., (*23)

The GitHub issues are intended for bug reports and feature requests. For help and questions with using aws-sdk-php please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner., (*24)

Contributing

We work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our contributing guidelines before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution., (*25)

Resources

The Versions

16/11 2017

dev-master

9999999-dev http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

13/09 2016

1.0.x-dev

1.0.9999999.9999999-dev http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

13/09 2016

1.2.0

1.2.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

13/09 2016

dev-revert-105-1.0

dev-revert-105-1.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

18/01 2016

3.1.0

3.1.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

18/09 2015

3.0.3

3.0.3.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

10/08 2015

3.0.2

3.0.2.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

06/08 2015

3.0.1

3.0.1.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

10/06 2015

3.0.0

3.0.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

10/06 2015

dev-sdk3

dev-sdk3 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

10/06 2015

2.0.x-dev

2.0.9999999.9999999-dev http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

10/06 2015

2.0.1

2.0.1.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

02/06 2015

dev-fix-remove-config_path

dev-fix-remove-config_path http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

12/03 2015

2.0.0

2.0.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

19/02 2015

2.0.0-beta.1

2.0.0.0-beta1 http://aws.amazon.com/sdkforphp2

A simple Laravel 5 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel amazon s3 aws sdk laravel 5 dynamodb ec2

13/02 2015

1.1.2

1.1.2.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

13/05 2014

1.1.1

1.1.1.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

04/09 2013

1.1.0

1.1.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

21/06 2013

1.0.4

1.0.4.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

26/04 2013

1.0.3

1.0.3.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

11/03 2013

1.0.2

1.0.2.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

07/03 2013

1.0.1

1.0.1.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

laravel laravel 4 amazon s3 aws sdk dynamodb ec2

14/02 2013

1.0.0

1.0.0.0 http://aws.amazon.com/sdkforphp2

A simple Laravel 4 service provider for including the AWS SDK for PHP.

  Sources   Download

Apache-2.0

The Requires

 

laravel laravel 4 amazon s3 aws sdk dynamodb ec2