PHPackages                             craftcms/aws-s3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. craftcms/aws-s3

ActiveCraft-plugin[File &amp; Storage](/categories/file-storage)

craftcms/aws-s3
===============

Amazon S3 integration for Craft CMS

2.3.0(2mo ago)631.5M—7.4%31[16 issues](https://github.com/craftcms/aws-s3/issues)[2 PRs](https://github.com/craftcms/aws-s3/pulls)20MITPHPPHP ^8.1.0CI passing

Since Jan 31Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/craftcms/aws-s3)[ Packagist](https://packagist.org/packages/craftcms/aws-s3)[ RSS](/packages/craftcms-aws-s3/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (54)Used By (20)Security (1)

[![Amazon S3 for Craft CMS icon](./src/icon.svg)](./src/icon.svg)

Amazon S3 for Craft CMS
=======================

[](#amazon-s3-for-craft-cms)

This plugin provides an [Amazon S3](https://aws.amazon.com/s3/) integration for [Craft CMS](https://craftcms.com/).

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0+ or 5.0.0+.

Installation
------------

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “Amazon S3”. Then press **Install** in its modal window.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/aws-s3

# tell Craft to install the plugin
./craft plugin/install aws-s3
```

Setup
-----

[](#setup)

To create a new Amazon S3 filesystem to use with your volumes, visit **Settings** → **Filesystems**, and press **New filesystem**. Select “Amazon S3” for the **Filesystem Type** setting and configure as needed.

> 💡 The Base URL, Access Key ID, Secret Access Key, Bucket, Region, Subfolder, CloudFront Distribution ID, and CloudFront Path Prefix settings can be set to environment variables. See [Environmental Configuration](https://craftcms.com/docs/4.x/config/#environmental-configuration) in the Craft docs to learn more about that.

### AWS IAM Permissions

[](#aws-iam-permissions)

Setting up IAM permissions for use with this plugin differs from what options you want to be available.

Generally, you'll want an IAM policy that grants the following actions on the [resource(s)](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) that you'll use:

- `s3:GetBucketLocation`
- `s3:ListBucket`
- `s3:PutObject`
- `s3:GetObject`
- `s3:DeleteObject`
- `s3:GetObjectAcl`
- `s3:PutObjectAcl`

If you want to allow the site administrator to list and select the bucket to use, you'll also have to add the `s3:ListAllMyBuckets` permission to the `arn:aws:s3:::` resource and the `s3:GetBucketLocation` permission to the specific bucket resource. Please note, that if a bucket lacks the `s3:GetBucketLocation` permission, it will not appear in the bucket selection list.

If you use Cloudfront and would like Craft to invalidate files on your behalf you'll also need the following permissions:

- `cloudfront:ListInvalidations`
- `cloudfront:GetInvalidation`
- `cloudfront:CreateInvalidation`

A typical IAM policy that grants the user to choose a bucket can look like this:

```
{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": [
            "s3:ListAllMyBuckets"
        ],
        "Resource": "*"
    },
    {
        "Effect": "Allow",
        "Action": [
            "s3:GetBucketLocation",
            "s3:ListBucket",
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject",
            "s3:GetObjectAcl",
            "s3:PutObjectAcl",
            "cloudfront:ListInvalidations",
            "cloudfront:GetInvalidation",
            "cloudfront:CreateInvalidation"
        ],
        "Resource": [
            "arn:aws:s3:::bucketname/*",
            "arn:aws:cloudfront::accountid:distribution/distributionid"
        ]
    },
    {
        "Effect": "Allow",
        "Action": [
            "s3:GetBucketLocation",
            "s3:ListBucket"
        ],
        "Resource": [
            "arn:aws:s3:::bucketname"
        ]
    }
]
}

```

### Using automatic focal point detection

[](#using-automatic-focal-point-detection)

This plugin can use the [AWS Rekognition](https://aws.amazon.com/rekognition/) service to detect faces in an image and automatically set the focal point accordingly. This requires the image to be either a jpg or a png file. You can enable this feature via **Attempt to set the focal point automatically?** in the filesystem settings.

> ⚠️ ️Using this will incur extra cost for each upload, and requires the `rekognition:DetectFaces` action to be allowed.

### Assuming Role with OIDC

[](#assuming-role-with-oidc)

This plugin also has the ability to assume a role provided to the runtime with the `AWS_WEB_IDENTITY_TOKEN_FILE` and `AWS_ROLE_ARN` environment variables. If you provide no credentials to AWS and these environment variables exist, then the plugin will attempt to create a connection to AWS using the `CredentialProvider::assumeRoleWithWebIdentityCredentialProvider`. This is the ideal way to allow fine-grained access control for hosting Craft CMS in Kubernetes (for example). See [the IAM documentation on AWS for more details](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html).

### Tasks running in ECS

[](#tasks-running-in-ecs)

This plugin is compatible with IAM roles for ECS tasks and will automatically use the `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` environment variable, if it’s available. See [the IAM Roles for Tasks documentation on AWS for more details](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html).

###  Health Score

68

—

FairBetter than 100% of packages

Maintenance81

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 53% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~15 days

Total

50

Last Release

63d ago

Major Versions

1.3.0 → 2.0.0-beta.12022-03-09

1.3.1 → 2.0.22023-03-16

1.3.2 → 2.0.32023-03-16

PHP version history (2 changes)2.0.0-beta.1PHP ^8.0.2

2.3.0PHP ^8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccdf8b493035de2343c55bd889513e3af5c04d5823482a2b186ad16adb1c3e3?d=identicon)[brandonkelly](/maintainers/brandonkelly)

---

Top Contributors

[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (178 commits)")[![andris-sevcenko](https://avatars.githubusercontent.com/u/1891118?v=4)](https://github.com/andris-sevcenko "andris-sevcenko (77 commits)")[![angrybrad](https://avatars.githubusercontent.com/u/61869?v=4)](https://github.com/angrybrad "angrybrad (47 commits)")[![timkelty](https://avatars.githubusercontent.com/u/18329?v=4)](https://github.com/timkelty "timkelty (9 commits)")[![i-just](https://avatars.githubusercontent.com/u/4500340?v=4)](https://github.com/i-just "i-just (5 commits)")[![samstevens](https://avatars.githubusercontent.com/u/4434133?v=4)](https://github.com/samstevens "samstevens (2 commits)")[![boboldehampsink](https://avatars.githubusercontent.com/u/378974?v=4)](https://github.com/boboldehampsink "boboldehampsink (2 commits)")[![kringkaste](https://avatars.githubusercontent.com/u/964698?v=4)](https://github.com/kringkaste "kringkaste (2 commits)")[![mikefrancis](https://avatars.githubusercontent.com/u/1672610?v=4)](https://github.com/mikefrancis "mikefrancis (1 commits)")[![phoban01](https://avatars.githubusercontent.com/u/4415593?v=4)](https://github.com/phoban01 "phoban01 (1 commits)")[![rsanchez](https://avatars.githubusercontent.com/u/227340?v=4)](https://github.com/rsanchez "rsanchez (1 commits)")[![sergeifilippov](https://avatars.githubusercontent.com/u/123676?v=4)](https://github.com/sergeifilippov "sergeifilippov (1 commits)")[![vonscriptor](https://avatars.githubusercontent.com/u/1682225?v=4)](https://github.com/vonscriptor "vonscriptor (1 commits)")[![1stevengrant](https://avatars.githubusercontent.com/u/112473?v=4)](https://github.com/1stevengrant "1stevengrant (1 commits)")[![Zae](https://avatars.githubusercontent.com/u/96126?v=4)](https://github.com/Zae "Zae (1 commits)")[![aaronbushnell](https://avatars.githubusercontent.com/u/315202?v=4)](https://github.com/aaronbushnell "aaronbushnell (1 commits)")[![aeu](https://avatars.githubusercontent.com/u/2225377?v=4)](https://github.com/aeu "aeu (1 commits)")[![brianjhanson](https://avatars.githubusercontent.com/u/1843073?v=4)](https://github.com/brianjhanson "brianjhanson (1 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (1 commits)")[![JoshCoady](https://avatars.githubusercontent.com/u/168141?v=4)](https://github.com/JoshCoady "JoshCoady (1 commits)")

---

Tags

awsaws-s3craft-plugincraft3craftcmsFlysystems3awscmsyii2craftcms

### Embed Badge

![Health badge](/badges/craftcms-aws-s3/health.svg)

```
[![Health](https://phpackages.com/badges/craftcms-aws-s3/health.svg)](https://phpackages.com/packages/craftcms-aws-s3)
```

###  Alternatives

[vaersaagod/dospaces

DigitalOcean Spaces integration for Craft CMS

36100.3k1](/packages/vaersaagod-dospaces)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[craftcms/google-cloud

Google Cloud Storage integration for Craft CMS

11100.7k1](/packages/craftcms-google-cloud)[servd/craft-asset-storage

Servd Asset Storage and Helpers integration for Craft CMS

1180.7k7](/packages/servd-craft-asset-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
