aws/aws-sdk-php-laravel
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
aws/aws-sdk-php | 3.308.5 | - | Apache-2.0 | prod | |
illuminate/support | v10.48.12 | - | MIT | prod |
The "aws/aws-sdk-php-laravel" is a simple Laravel service provider for effortlessly incorporating the official AWS (Amazon Web Services) SDK (Software Development Kit) for PHP into your Laravel and Lumen applications. This provides developers with a way to interact with Amazon's wide-ranging cloud services like Amazon S3, EC2, DynamoDB, and more directly from their PHP applications. It is compatible with Laravel versions 5 through 10.
To make use of the "aws/aws-sdk-php-laravel" in your application, you'll need to first install it via Composer. This can be done by adding "aws/aws-sdk-php-laravel: ~3.0" to the require section of your project's composer.json
file and running a composer update (php composer.phar update
). Once installation is done, you'll have to register the AWS Service Provider in your application bootstrap file.
If you're using Lumen, include the following line in your bootstrap/app.php
file:
$app->register(Aws\Laravel\AwsServiceProvider::class);
For Laravel, add the provider and the AWS facade alias in the config/app.php
file as shown below:
'providers' => array(
// ...
Aws\Laravel\AwsServiceProvider::class,
)
'aliases' => array(
// ...
'AWS' => Aws\Laravel\AwsFacade::class,
)
With configuration, the package utilizes AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables for autopilot configuration. You can, however, customize the configuration file (config/aws.php
) that gets generated when you run: php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider"
Finally, you can use the AWS SDK in your app like so:
$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',
));
You can find extensive documentation for the "aws/aws-sdk-php-laravel" service provider on the AWS SDK for PHP Github repository. Information on getting started, seeking help, contributing, and interacting with different AWS services is presented in a detailed, user-friendly manner. Further documentation can be located on the AWS SDK for PHP website.