Sunday, 27 December 2020 14:15

Filesystem for Amazon S3

Store and manage files using Amazon S3
About this plugin
Configuration
 

The Filesystem Plugin for Amazon S3 provides an alternate filesystem for accessing and manipulating files on an Amazon S3 account.

An Amazon S3 account as well as a working knowledge of Amazon S3 are required to successfully use this add-on.

Some features eg: Image Editing, Resizing and Thumbnailing, may not be available when using this plugin.

Amazon S3 is a trademark of Amazon.com, Inc. or its affiliates.

To configure the Filesystem for Amazon S3 Add-on :

  1. Open an Editor Profile for editing and click on the Editor Parameters tab.
  2. Click on the Filesystem tab.
  3. Select Amazon S3 from the Filesystem list.
    Select Amazon S3
  4. Enter in your Amazon S3 settings. Bucket name and Endpoint are required. Access Key and Secret Key are required if you are not using a Credentials Profile
    S3 Options

    Access Key - Your S3 Access Key ID

    Secret Key - Secret Access Key

    Credentials Profile - The name of the credentials profile (Optional). See Using a Credentials File

    Credentials Path - The full server path to the credentials file (Optional). See Using a Credentials File

    Bucket name - S3 Bucket Name. For more information on S3 Buckets, see Introduction to Amazon S3 - Buckets

    CName - A Canonical Name for the bucket (Optional).

    Endpoint - The Region where the bucket is stored. See Introduction to Amazon S3 - Regions

    ACL Level - Default ACL level for new files and folders. See Introduction to Amazon S3 - ACL

  5. Click Save

With the Amazon S3 options set, you can now uses this as your default Filesystem, or revert to using the default Joomla! filesystem, and assign the Amazon S3 Filesystem to individual add-ons like the File Manager or Media Manager in the plugins parameters.

Using a Credentials File

Using a Credentials File for the Access Key and Secret Key recommended, as this does not store the Access Key and Secret Key in the database. Amazon provides an explanation of the Credentials File and Profile, but this plugin provides an additional option to set the full server path to the file, which may be required if the server HOME directory cannot be determined.

The credentials file is a special INI-formatted file that contains one or more Credentials Profiles, each containing an Access Key and Secret Key, eg:

[default]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY

[project1https://cdn.joomlacontenteditor.net/images/docs/amazons3/aws-unzip-me.zip" class="wf_file" style="color: rgb(30, 135, 240); text-decoration: none; cursor: pointer;" title="Sample aws file" download="aws-unzip-me.zip">sample file - unzip after download)
  • Add the Credentials Profiles and Access Key and Secret Key as required.
  • In the Joomla Administration, go to Site -> System Information, and find the tmp_path value. Copy the value up to but excluding "/public_html"
    eg: /home/my_account/my_site
  • Paste this path into the Credentials Path option field, adding any other folder name you created the "credentials" folder in
    eg: /home/my_account/my_site/private_html

IAM Permissions

The following IAM permissions are required:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "jce-aws-s3-1",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:GetObjectAcl",
                "s3:PutObject",
                "s3:PutObjectAcl",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::your-bucket-name",
                "arn:aws:s3:::your-bucket-name/*"
            ]
        }
    ]
}
Read 8463 times
More in this category: « JCE MediaBox