{"id":20701435,"url":"https://github.com/lukewaite/laravel-aws-cache-adapter","last_synced_at":"2025-04-22T23:13:25.697Z","repository":{"id":62520249,"uuid":"89788005","full_name":"lukewaite/laravel-aws-cache-adapter","owner":"lukewaite","description":"Laravel Cache Adapter for AWS Credential Caching. Reduces calls to the EC2 metadata API.","archived":false,"fork":false,"pushed_at":"2023-02-13T19:33:08.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T23:13:17.513Z","etag":null,"topics":["aws","aws-php-sdk","iam","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukewaite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-29T13:45:01.000Z","updated_at":"2022-12-26T07:43:31.000Z","dependencies_parsed_at":"2024-11-17T00:42:02.335Z","dependency_job_id":"e8eb10a4-0288-4a4f-ab21-6c73b68e1281","html_url":"https://github.com/lukewaite/laravel-aws-cache-adapter","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"24c18035ed3c5a7297e98bc7ab0e665a5d858f20"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewaite%2Flaravel-aws-cache-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewaite%2Flaravel-aws-cache-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewaite%2Flaravel-aws-cache-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewaite%2Flaravel-aws-cache-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukewaite","download_url":"https://codeload.github.com/lukewaite/laravel-aws-cache-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337949,"owners_count":21414104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-php-sdk","iam","laravel","php"],"created_at":"2024-11-17T00:41:47.250Z","updated_at":"2025-04-22T23:13:25.680Z","avatar_url":"https://github.com/lukewaite.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-aws-cache-adapter\n\u003e Provides an `Aws\\CacheInterface\\CacheInterface` compliant cache for the\nAWS SDK which uses the laravel Cache classes.\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Code Coverage][ico-coverage]][link-coverage]\n\n### Purpose\nWhen using EC2 Instance IAM Roles or ECS Task IAM Roles the AWS php sdk automatically performs\nlookups against the ec2 metadata api (169.254.169.254) to get credentials. These by default\nare not cached, and can occasionally be a source of trouble or slowdowns if the metadata api\nis slow/not responding.\n\nThis package allows you to configure certain laravel filesystems to be automatically loaded\nwith a `CacheInterface` that will use a laravel cache store to cache the STS tokens returned,\nreducing requests to the metadata api.\n\n\n# Usage\n\n### Direct Usage of the Adapter\nThe `LaravelCacheAdapter` can be passed directly into Flysystem in your `config/filesystems.php`\n```\n    's3' =\u003e [\n        'driver'      =\u003e 's3',\n        'base-path'   =\u003e 'https://s3.amazonaws.com',\n        'credentials' =\u003e new LaravelCacheAdapter(app('cache'))\n        'bucket'      =\u003e env('AWS_BUCKET'),\n        'region'      =\u003e env('AWS_REGION', 'us-east-1'),\n    ],\n```\n\n### Auto Insertion of the CredentialProvider via ServiceProvider\nThe default configuration settings are in `/config/laravel-aws-cache.php`. Copy this file to your\nown config directory to modify the values. You can publish this config using this command:\n```\n$ php artisan vendor:publish --provider=\"LukeWaite\\LaravelAwsCacheAdapter\\ServiceProvider\"\n```\n\n#### Configuration\n```\nreturn [\n    /**\n     * A comma separated list of filesystems defined in `config/filesystems.php` to which the\n     * credential cache should be applied.\n     */\n    'filesystems' =\u003e env('LARAVEL_AWS_CACHE_FILESYSTEMS', null),\n\n    /**\n     * Whether or not to iterate through the `filesystems` defined and apply the credential cache.\n     */\n    'enable' =\u003e env('LARAVEL_AWS_CACHE_ENABLE', false),\n\n    /**\n     * The Laravel cache store defined in `config/cache.php` to use.\n     */\n    'cache' =\u003e env('LARAVEL_AWS_CACHE_CACHE', 'file')\n];\n```\n\n[ico-version]: https://img.shields.io/packagist/v/lukewaite/laravel-aws-cache-adapter.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/lukewaite/laravel-aws-cache-adapter/master.svg?style=flat-square\n[ico-coverage]: https://img.shields.io/scrutinizer/coverage/g/lukewaite/laravel-aws-cache-adapter/master.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/lukewaite/laravel-aws-cache-adapter\n[link-travis]: https://travis-ci.org/lukewaite/laravel-aws-cache-adapter\n[link-coverage]: https://scrutinizer-ci.com/g/lukewaite/laravel-aws-cache-adapter/?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewaite%2Flaravel-aws-cache-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukewaite%2Flaravel-aws-cache-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewaite%2Flaravel-aws-cache-adapter/lists"}