New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

healthengine/laravel-easy-aws

Cache dynamic AWS credentials
268,410 1
Install
composer require healthengine/laravel-easy-aws
Latest Version:v6.0.0
PHP:~8.3.0 || ~8.4.0 || ~8.5.0
Laravel:13
Older releases:5 – 12
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  Packagist
Maintainer: tspencer244

Laravel Easy AWS

Latest Stable Version Total Downloads

This is an extension to the Laravel AWS SDK that provides cacheable dynamic credentials - such as those provided by the EC2 Metadata API. This is necessary if you want to php artisan config:cache whilst also not using hard coded credentials - since Laravel is unable to cache the Guzzle promise that resolves to credentials when used.

It also binds certain AWS client objects to the Laravel container so you can typehint the specific clients you need, instead of using the AWS facade. Clients are added as needed and we welcome PRs so if you need one that is missing, please contribute.

Installation

composer require healthengine/laravel-easy-aws

Usage

There's not much to it. You can now typehint the S3Client directly and it will be resolved instead of having to use the facade to construct the S3 client:

// before
$s3 = AWS::createClient('s3');

// after
$s3 = app(Aws\S3\S3Client::class);

Credentials are resolved automatically using the default provider chain from the AWS SDK. The only difference is that they will be cached using Laravel's AwsCredentialCache. This really only helps if that credentials chain ended up resolving credentials from the EC2 Metadata API, otherwise it would have been using hardcoded credentials of some kind and caching them doesn't help much.

You can configure which cache store to use by setting the environment variable EASYAWS_CACHE_STORE to any built in Laravel cache drivers.

Note

Caching credentials can be insecure. Be careful if you are going to use an external cache driver like Redis or database as the credentials are stored in plaintext.

Retries

All clients use the AWS SDK's standard retry mode.

SQS Queue

This package no longer overrides Laravel's sqs queue connector. To cache SQS credentials, enable Laravel's built-in credential cache on the connection in config/queue.php:

'sqs' => [
    'driver' => 'sqs',
    // ...
    'credential_cache' => [
        'enabled' => true,
        'store' => 'file', // any cache store
    ],
],

Laravel's SQS connector defaults both timeouts to 60 seconds. Set queue.connections.sqs.http.connect_timeout and queue.connections.sqs.http.timeout to change them.

License

Laravel Easy AWS is licensed under the MIT license.

Related Packages

async-aws/illuminate-cache

AsyncAws integration for Illuminate Cache.

209,069 2
lukewaite/laravel-aws-cache-adapter

Laravel Cache Adapter for AWS Credential Caching. Allows you to reduce calls to...

25,372 5
db1-fpp/laravel-elasticache

Add new cache and session driver to use AWS ElastiCache with auto discovery

1,318 2
bunkuris/has-cache

HasCache trait for Laravel models with cache key managers

3,582 0
cwilsn/laravel-aws-sso

Seamless AWS IAM Identity Center authentication for local Laravel development.

1,073 0

Version History

Version Released PHP Laravel License
v6.0.0 ~8.3.0 || ~8.4.0 || ~8.5.0 ^13.27 MIT
v5.1.0 ~8.3.0 || ~8.4.0 || ~8.5.0 ^13.0 MIT
v5.0.0 ~8.3.0 || ~8.4.0 ^13.0 MIT
v4.0.1 ~8.2.0 || ~8.3.0 ^12.0 MIT
v4.0.0 ~8.2.0 || ~8.3.0 ^12.0 MIT