PHPackages                             bnagydeveloper/aws-sdk-php-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. bnagydeveloper/aws-sdk-php-laravel

ActiveLibrary[File &amp; Storage](/categories/file-storage)

bnagydeveloper/aws-sdk-php-laravel
==================================

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

3.4.0(6y ago)010Apache-2.0PHPPHP &gt;=5.5.9

Since Feb 14Pushed 6y agoCompare

[ Source](https://github.com/bnagydeveloper/aws-sdk-php-laravel)[ Packagist](https://packagist.org/packages/bnagydeveloper/aws-sdk-php-laravel)[ Docs](http://aws.amazon.com/sdkforphp2)[ RSS](/packages/bnagydeveloper-aws-sdk-php-laravel/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (29)Used By (0)

AWS Service Provider for Laravel 5
==================================

[](#aws-service-provider-for-laravel-5)

[![@awsforphp on Twitter](https://camo.githubusercontent.com/c17b2c5b53b824f61a1500d2c0f70eb94ad3d85ab13798c417e499e700878b93/687474703a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d253430617773666f727068702d626c75652e7376673f7374796c653d666c6174)](https://twitter.com/awsforphp)[![Build Status](https://camo.githubusercontent.com/97061e2ed3219086b3160244136cbef1f1e3c33fd9aad79bfbdb1d79af6e15f0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6177732f6177732d73646b2d7068702d6c61726176656c2e737667)](https://travis-ci.org/aws/aws-sdk-php-laravel)[![Latest Stable Version](https://camo.githubusercontent.com/af566fcf798b6cdbf8def55a7c7c193846b376ed9c7ee48d3d68281f4f1b1a5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6177732f6177732d73646b2d7068702d6c61726176656c2e737667)](https://packagist.org/packages/aws/aws-sdk-php-laravel)[![Total Downloads](https://camo.githubusercontent.com/4861eb3806df7207ff75267d9fceac0fe8eccb5deab3e49c1f05468c79ea98a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6177732f6177732d73646b2d7068702d6c61726176656c2e737667)](https://packagist.org/packages/aws/aws-sdk-php-laravel)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

This is a simple [Laravel](http://laravel.com/) service provider for making it easy to include the official [AWS SDK for PHP](https://github.com/aws/aws-sdk-php) in your Laravel and Lumen applications.

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.

**Major Versions:**

- **3.x** (YOU ARE HERE) - For `laravel/framework:~5.1|~6.0` and `aws/aws-sdk-php:~3.0`
- **2.x** ([2.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/2.0)) - For `laravel/framework:5.0.*` and `aws/aws-sdk-php:~2.4`
- **1.x** ([1.0 branch](https://github.com/aws/aws-sdk-php-laravel/tree/1.0)) - For `laravel/framework:4.*` and `aws/aws-sdk-php:~2.4`

Installation
------------

[](#installation)

The AWS Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `aws/aws-sdk-php-laravel` package in your project's `composer.json`.

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

Then run a composer update

```
php composer.phar update
```

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

### Lumen

[](#lumen)

In Lumen find the `Register Service Providers` in your `bootstrap/app.php` and register the AWS Service Provider.

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

### Laravel

[](#laravel)

In Laravel find the `providers` key in your `config/app.php` and register the AWS Service Provider.

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

Find the `aliases` key in your `config/app.php` and add the AWS facade alias.

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

Configuration
-------------

[](#configuration)

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

```
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.

```
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.

```
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](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#default-credential-chain) instead.

Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config file instead of environment variable option if using php artisan `config:cache`.

Learn more about [configuring the SDK](http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html) on the SDK's User Guide.

Usage
-----

[](#usage)

In order to use the AWS SDK for PHP within your app, you need to retrieve it from the [Laravel Service Container](https://laravel.com/docs/container#binding). The following example uses the Amazon S3 client to upload a file.

```
$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.

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

Links
-----

[](#links)

- [AWS SDK for PHP on Github](http://github.com/aws/aws-sdk-php/)
- [AWS SDK for PHP website](http://aws.amazon.com/sdkforphp/)
- [AWS on Packagist](https://packagist.org/packages/aws/)
- [License](http://aws.amazon.com/apache2.0/)
- [Laravel website](http://laravel.com/)

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~100 days

Recently: every ~81 days

Total

25

Last Release

2434d ago

Major Versions

1.1.2 → 2.0.0-beta.12015-02-19

2.0.x-dev → 3.0.02015-06-10

1.0.x-dev → 3.2.02017-11-16

PHP version history (4 changes)1.0.0PHP &gt;=5.3.7

1.0.4PHP &gt;=5.3.3

2.0.0-beta.1PHP &gt;=5.4.0

3.0.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13622436?v=4)[Nagy Botond](/maintainers/bnagydeveloper)[@bnagydeveloper](https://github.com/bnagydeveloper)

---

Top Contributors

[![jeremeamia](https://avatars.githubusercontent.com/u/107867?v=4)](https://github.com/jeremeamia "jeremeamia (46 commits)")[![holorhythms](https://avatars.githubusercontent.com/u/38118252?v=4)](https://github.com/holorhythms "holorhythms (18 commits)")[![jeskew](https://avatars.githubusercontent.com/u/705500?v=4)](https://github.com/jeskew "jeskew (10 commits)")[![tomschlick](https://avatars.githubusercontent.com/u/70184?v=4)](https://github.com/tomschlick "tomschlick (5 commits)")[![chuck014](https://avatars.githubusercontent.com/u/2904081?v=4)](https://github.com/chuck014 "chuck014 (5 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![kstich](https://avatars.githubusercontent.com/u/26905335?v=4)](https://github.com/kstich "kstich (2 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (2 commits)")[![aykutfarsak](https://avatars.githubusercontent.com/u/311125?v=4)](https://github.com/aykutfarsak "aykutfarsak (2 commits)")[![cjyclaire](https://avatars.githubusercontent.com/u/10790394?v=4)](https://github.com/cjyclaire "cjyclaire (2 commits)")[![bnagydeveloper](https://avatars.githubusercontent.com/u/13622436?v=4)](https://github.com/bnagydeveloper "bnagydeveloper (2 commits)")[![jasonlewis](https://avatars.githubusercontent.com/u/829059?v=4)](https://github.com/jasonlewis "jasonlewis (2 commits)")[![ptcrash](https://avatars.githubusercontent.com/u/1130387?v=4)](https://github.com/ptcrash "ptcrash (1 commits)")[![SOSTheBlack](https://avatars.githubusercontent.com/u/5401143?v=4)](https://github.com/SOSTheBlack "SOSTheBlack (1 commits)")[![Athuli7](https://avatars.githubusercontent.com/u/4718029?v=4)](https://github.com/Athuli7 "Athuli7 (1 commits)")[![uniconstructor](https://avatars.githubusercontent.com/u/1384545?v=4)](https://github.com/uniconstructor "uniconstructor (1 commits)")[![Ben52](https://avatars.githubusercontent.com/u/5143458?v=4)](https://github.com/Ben52 "Ben52 (1 commits)")[![caseyh](https://avatars.githubusercontent.com/u/2567473?v=4)](https://github.com/caseyh "caseyh (1 commits)")[![daylerees](https://avatars.githubusercontent.com/u/207870?v=4)](https://github.com/daylerees "daylerees (1 commits)")[![digitalfiz](https://avatars.githubusercontent.com/u/157699?v=4)](https://github.com/digitalfiz "digitalfiz (1 commits)")

---

Tags

laravelamazons3sdkawsdynamodbec2laravel 5

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bnagydeveloper-aws-sdk-php-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/bnagydeveloper-aws-sdk-php-laravel/health.svg)](https://phpackages.com/packages/bnagydeveloper-aws-sdk-php-laravel)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M74](/packages/aws-aws-sdk-php-laravel)[aws/aws-sdk-php-resources

A resource-oriented API for interacting with AWS services

1381.8M10](/packages/aws-aws-sdk-php-resources)[aws/aws-sdk-php-silex

A simple Silex service provider for including the AWS SDK for PHP.

84624.6k2](/packages/aws-aws-sdk-php-silex)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[platinumpixs/aws-symfony2-bundle

A simple Symfony 2 bundle for including the AWS SDK for PHP.

1274.3k1](/packages/platinumpixs-aws-symfony2-bundle)[iwai/aws-sdk-php-phalcon

A simple Phalcon service provider for including the AWS SDK for PHP.

224.3k](/packages/iwai-aws-sdk-php-phalcon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
