tystr/aws-bundle

This bundle integrates the AWS SDK for PHP into symfony2

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony2-bundle

dev-master 2013-12-30 07:04 UTC

This package is not auto-updated.

Last update: 2024-04-22 23:18:03 UTC


README

Build Status

This bundle integrates the AWS SDK for PHP into symfony2.

Installation

Add the following to your composer.json:

{
    "require": {
        "tystr/aws-bundle": "dev-master@dev"
    }
}

Install the bundle using composer:

$ php composer.phar update tystr/aws-bundle

Finally, register the bundle with your application:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Tystr\Bundle\AwsBundle\TystrAwsBundle()
    );
}

Now you'll just need to set some configuration parameters, and you're ready to go!

Configuration

Configuration is pretty simple. Each parameter you set here is passed to the factory which will create any aws service you request.

tystr_aws:
    access_key: YOUR_AWS_ACCESS_KEY
    secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
    region: us-east-1 # You must set a default region to be passed to the aws clients

See the full default configuration in the Configuration Reference section of the docs.

Usage

For example, to fetch an instance of the s3 client:

$s3 = $this->get('tystr_aws.s3');

The following services are exposed by this bundle:

tystr_aws.s3
tystr_aws.route53
tystr_aws.ec2
tystr_aws.autoscaling
tystr_aws.cloudformation
tystr_aws.cloudfront
tystr_aws.cloudsearch
tystr_aws.coudtrail
tystr_aws.cloudwatch
tystr_aws.datapipeline
tystr_aws.directconnect
tystr_aws.dynamodb
tystr_aws.elasticache
tystr_aws.elasticbeanstalk
tystr_aws.elb
tystr_aws.elastictranscoder
tystr_aws.em
tystr_aws.glacier
tystr_aws.iam
tystr_aws.importexport
tystr_aws.kinesis
tystr_aws.opsworks
tystr_aws.rds
tystr_aws.redshift
tystr_aws.ses
tystr_aws.simpledb
tystr_aws.sns
tystr_aws.sqs
tystr_aws.storagegateway

Profit!