lightmaker/aws-bundle

A Symfony2 bundle for the AWS SDK for PHP

1.2.1 2016-07-28 17:42 UTC

This package is not auto-updated.

Last update: 2023-07-08 10:33:46 UTC


README

A simple wrapper around the AWS PHP SDK 2 for Symfony2

Installation

Add to Composer

Add the following to your projects composer.json

{
    "require": {
        "lightmaker/aws-bundle": "1.0.*"
    }
}

Update your Kernel

#AppKernel.php
public function registerBundles() {
  $bundles = array(
    new Lightmaker\AwsBundle\LightmakerAwsBundle()
  );
}

Add Configuration

# app/config/config.yml
lightmaker_aws:
    key:    %aws_key%
    secret: %aws_secret%
    region: %aws_region%
# app/config/parameters.yml.dist
parameters:
    aws_key:
    aws_secret:
    aws_region:

composer.phar update

You can now access the AWS SDK through the container or dependency injection.

$this->get("lightmaker_aws")->get('s3');

See the AWS SDK for PHP 2 docs for more info http://docs.aws.amazon.com/aws-sdk-php/guide/latest/index.html