Polyscope - The agent-first dev environment for Laravel

Aws Sdk Php Laravel

aws/aws-sdk-php-laravel image

Aws Sdk Php Laravel stats

Downloads
20.4M
Stars
1,590
Open Issues
9
Forks
283

View on GitHub →

A simple Laravel 5/6/7/8/9 service provider for including the AWS SDK for PHP.

AWS SDK PHP Laravel Package Summary

The AWS SDK PHP Laravel package provides a simple and efficient way to integrate the AWS SDK into Laravel and Lumen applications, supporting a wide range of Laravel versions from 5.1 to 10.0. The package offers a Laravel service provider to include the official AWS SDK for PHP, simplifying the interaction with AWS services.

Key Features

  • Compatibility: Supports Laravel versions 5.1 to 10.0.
  • Ease of Installation: Can be installed via Composer.
  • Automatic Configuration: Utilizes environment variables for hassle-free setup.
  • Facilitates AWS Service Operations: Simplifies tasks like uploading files to S3 using Laravel's service container or the AWS facade.

Installation

Install the package using Composer:

composer require aws/aws-sdk-php-laravel:~3.0

For Laravel, add the service provider and facade alias in config/app.php:

'providers' => [
Aws\Laravel\AwsServiceProvider::class,
// other providers
];
 
'aliases' => [
'AWS' => Aws\Laravel\AwsFacade::class,
// other aliases
];

For Lumen, register the service provider in bootstrap/app.php:

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

Configuration

The package uses three main environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION. To customize these settings, publish the configuration file:

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

Modify the settings in the published config/aws.php.

Usage

Retrieve the AWS client from the Laravel service container and perform operations like:

$s3 = App::make('aws')->createClient('s3');
$s3->putObject([
'Bucket' => 'YOUR_BUCKET',
'Key' => 'YOUR_OBJECT_KEY',
'SourceFile' => '/path/to/your/file.ext',
]);

Or use the AWS facade:

$s3 = AWS::createClient('s3');
$s3->putObject([...]);

Getting Help

For support, you can ask questions on StackOverflow with the aws-php-sdk tag, join the AWS SDK for PHP Gitter community, or open a support ticket with AWS Support. For bugs and feature requests, open an issue on the GitHub repository.

Contributing

Contributions are welcome. Review the contributing guidelines before submitting issues or pull requests.

This package is a practical choice for Laravel developers looking to leverage AWS services effectively, providing a robust toolset facilitated by the AWS SDK for PHP.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Aws Aws Sdk Php Laravel Related Articles

AWS Developer Center for PHP image

AWS Developer Center for PHP

Read article
Forward Laravel Logs to Amazon Kinesis image

Forward Laravel Logs to Amazon Kinesis

Read article
Things I Didn't Know About SQS image

Things I Didn't Know About SQS

Read article
Using the AWS PHP SDK image

Using the AWS PHP SDK

Read article
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Celebian logo

Celebian

Celebian is a social media marketing agency specializing in helping their clients go viral on TikTok. Whether you're looking to reach a bigger audience or gain more Tiktok followers, likes, and views, they've got you covered.

Celebian
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech