{"id":13606165,"url":"https://github.com/wintercms/wn-driveraws-plugin","last_synced_at":"2025-05-13T16:31:47.857Z","repository":{"id":56899638,"uuid":"478283971","full_name":"wintercms/wn-driveraws-plugin","owner":"wintercms","description":"Adds support for the AWS SDK (S3 storage, SQS queues, DynamoDB, SES mailer, streamed file uploads, etc) to Winter CMS","archived":false,"fork":false,"pushed_at":"2024-10-20T07:14:31.000Z","size":116,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-27T10:02:09.330Z","etag":null,"topics":["aws","dynamodb","hacktoberfest","laravel","plugin","s3","sqs","wintercms"],"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/wintercms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null},"funding":{"github":"wintercms","open_collective":"wintercms"}},"created_at":"2022-04-05T20:07:02.000Z","updated_at":"2024-10-20T07:14:35.000Z","dependencies_parsed_at":"2024-04-11T05:25:41.139Z","dependency_job_id":"b8e31006-9c26-436c-bb4c-1c9ea9afa50f","html_url":"https://github.com/wintercms/wn-driveraws-plugin","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":0.4,"last_synced_commit":"02c8555152973ed69a2fc386c6f3472fc64e36eb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-driveraws-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-driveraws-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-driveraws-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wintercms%2Fwn-driveraws-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wintercms","download_url":"https://codeload.github.com/wintercms/wn-driveraws-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252783890,"owners_count":21803572,"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","dynamodb","hacktoberfest","laravel","plugin","s3","sqs","wintercms"],"created_at":"2024-08-01T19:01:06.678Z","updated_at":"2025-05-13T16:31:45.590Z","avatar_url":"https://github.com/wintercms.png","language":"PHP","funding_links":["https://github.com/sponsors/wintercms","https://opencollective.com/wintercms"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# AWS Driver Plugin\r\n\r\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wintercms/wn-driveraws-plugin/blob/main/LICENSE)\r\n\r\nThis plugin adds support for integrating various AWS services into Winter CMS.\r\n\r\nSupports:\r\n- Configuring \u0026 using AWS Simple Email Service (SES) as a system mailer service.\r\n- Using S3 (and S3-compatible storage providers) as a filesystem driver\r\n- Simple Queing System (SQS) for queues\r\n- DynamoDB as a cache driver\r\n- Streamed file uploads to S3 (and S3-compatible storage providers)\r\n\r\n## Installation\r\n\r\nThis plugin is available for installation via [Composer](http://getcomposer.org/).\r\n\r\n```bash\r\ncomposer require winter/wn-driveraws-plugin\r\n```\r\n\r\nAfter installing the plugin you will need to run the migrations and (if you are using a [public folder](https://wintercms.com/docs/develop/docs/setup/configuration#using-a-public-folder)) [republish your public directory](https://wintercms.com/docs/develop/docs/console/setup-maintenance#mirror-public-files).\r\n\r\n```bash\r\nphp artisan migrate\r\n```\r\n\r\n## Usage\r\n\r\nSimply installing \u0026 enabling this plugin should be enough to enable support for the AWS drivers for various core Winter / Laravel functionality (i.e. `s3` filesystem disks, `sqs` queues, `dynamodb` caches, `ses` mailers, etc).\r\n\r\nThis plugin also provides some additional functionality over and above the AWS SDK, including:\r\n\r\n- [Backend configuration of SES as a Mailer](#backend-ses-mailer)\r\n- [Streamed File Uploads to S3](#streamed-uploads)\r\n\r\n\u003ca name=\"backend-ses-mailer\"\u003e\u003c/a\u003e\r\n### Backend Configuration of SES as a Mailer\r\n\r\nBy default you can setup SES as a mail transport by configuring the `mail.mailers.*` option to `ses` and providing the `services.aws.key`, `services.aws.secret`, and `services.aws.region` configuration values in your configuration files. This plugin also provides the ability to configure these values through the backend Mail Settings form.\r\n\r\n\u003ca name=\"streamed-uploads\"\u003e\u003c/a\u003e\r\n### Streamed File Uploads to S3\r\n\r\n\u003e**NOTE:** This feature requires Winter v1.2.1 or greater.\r\n\r\nWhen dealing with large files or serverless application infrastructure it can be extremely useful to support client-side direct uploads to S3 (i.e. file uploads are streamed to S3 directly from the browser without going through the application server). This plugin provides the ability to do this by automatically hooking into the FileUpload, MediaManager, RichEditor, \u0026 MarkdownEditor Widgets and providing the ability to upload directly to S3 when their respective disk configurations are set to `s3` and have the `stream_uploads` option set to `true`.\r\n\r\nThe following additional configuration options are available to be set on `s3` disk configurations:\r\n\r\n```php\r\n's3' =\u003e [\r\n    // Default options\r\n    'bucket' =\u003e env('AWS_BUCKET'),\r\n    'driver' =\u003e 's3',\r\n    'endpoint' =\u003e env('AWS_ENDPOINT'),\r\n    'key' =\u003e env('AWS_ACCESS_KEY_ID'),\r\n    'region' =\u003e env('AWS_DEFAULT_REGION'),\r\n    'secret' =\u003e env('AWS_SECRET_ACCESS_KEY'),\r\n    'stream_uploads' =\u003e env('AWS_S3_STREAM_UPLOADS', false),\r\n    'url' =\u003e env('AWS_URL'),\r\n    'use_path_style_endpoint' =\u003e env('AWS_USE_PATH_STYLE_ENDPOINT', false)\r\n\r\n    // Additional options used by the StreamS3Uploads functionality:\r\n    // The lifespan of the signed URL in minutes\r\n    'stream_uploads_ttl' =\u003e 5,\r\n    // The max upload size of a single file in bytes, default 128 MB\r\n    'stream_uploads_max_size' =\u003e 128 * 1024 * 1024,\r\n],\r\n```\r\n\r\n\u003e**NOTE:** In order to use the streamed uploads functionality, your AWS credential require access to the following actions on the desired S3 bucket:\r\n\r\n- `s3:PutObject`\r\n- `s3:PutObjectAcl`\r\n- `s3:GetObject`\r\n- `s3:GetObjectAcl`\r\n- `s3:DeleteObject`\r\n\r\nSee below for an example IAM policy that shoud work:\r\n\r\n```json\r\n{\r\n    \"Version\": \"2012-10-17\",\r\n    \"Statement\": [\r\n        {\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"s3:ListBucket\",\r\n                \"s3:ListAllMyBuckets\",\r\n                \"s3:GetBucketLocation\"\r\n            ],\r\n            \"Resource\": [\r\n                \"arn:aws:s3:::my-bucket-name-here\"\r\n            ]\r\n        },\r\n        {\r\n            \"Effect\": \"Allow\",\r\n            \"Action\": [\r\n                \"s3:PutObject\",\r\n                \"s3:PutObjectAcl\",\r\n                \"s3:GetObject\",\r\n                \"s3:GetObjectAcl\",\r\n                \"s3:DeleteObject\"\r\n            ],\r\n            \"Resource\": [\r\n                \"arn:aws:s3:::my-bucket-name-here/*\"\r\n            ]\r\n        }\r\n    ]\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwintercms%2Fwn-driveraws-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwintercms%2Fwn-driveraws-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwintercms%2Fwn-driveraws-plugin/lists"}