A composer plugin to load repository data and download packages from Amazon S3 with authentication support for private repositories.
Using AWS S3 to host private packages? Check out Private Packagist for a better private Composer repository solution!
This project has been abandoned and will not support Composer 2.0. If you are currently relying on this plugin to download packages from S3, you should consider using Private Packagist to manage your private packages.
$ composer global require "naderman/composer-aws:^1.0"
$ composer require "naderman/composer-aws:^1.0"
There are three options available in order to configure and use this plugin:
- For AWS EC2: Create an IAM profile for your instances to access the bucket - then no other configuration is necessary.
- Set the environment variables
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Add the following to your
config.json
(in$COMPOSER_HOME
):
{
"config": {
"amazon-aws": {
"credentials": {
"key": "your aws access key",
"secret": "your aws secret"
}
}
}
}
Once the plugin is installed and configured, you can transparently use packages.json
files which contain s3://
schemes for dist urls.
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/"
}
]
}
- AWS IAM Instance profiles: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html
- Amazon S3 Syncer: https://github.com/easybiblabs/s3-syncer