AWS Plugin for Composer
PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Naderman/Composer/AWS
tests
.gitignore
LICENSE
README.md
composer.json
composer.lock
phpunit.xml.dist - upgrade aws sdk to version 3 Aug 13, 2016

README.md

composer-aws

A composer plugin to load repository data and download packages from Amazon S3 with authentication support for private repositories.

Installation

Global scope (per user) installation

$ composer global require "naderman/composer-aws:~0.2"

Project scope installation

$ composer require "naderman/composer-aws:~0.2"

Configuration

There are three options available in order to configure and use this plugin:

  1. For AWS EC2: Create an IAM profile for your instances to access the bucket - then no other configuration is necessary.
  2. Set the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  3. Add the following to your config.json (in $COMPOSER_HOME):
{
    "config": {
        "amazon-aws": {
            "credentials": {
                "key": "your aws access key",
                "secret": "your aws secret"
            }
        }
    }
}

Usage

Once the plugin is installed and configured, you can transparently use packages.json files which contain s3:// schemes for dist urls.

Loading package repositories from AWS S3

If you want to host a packages.json repository on S3 (e.g. generated by satis), you can use an S3 bucket for the repository url as well.

{
    "repositories": [
        {
            "type": "composer",
            "url": "s3://my-S3-bucket/my/packages/repository/path/"
        }
    ]
}

Further reading