Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacfi/aws-bundle
AWS SDK for PHP Bundle for Symfony
https://github.com/hacfi/aws-bundle
Last synced: 12 days ago
JSON representation
AWS SDK for PHP Bundle for Symfony
- Host: GitHub
- URL: https://github.com/hacfi/aws-bundle
- Owner: hacfi
- License: mit
- Created: 2015-04-20T10:11:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T18:16:13.000Z (almost 9 years ago)
- Last Synced: 2024-10-30T01:42:16.393Z (about 2 months ago)
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS SDK for PHP Bundle for Symfony
## Install
``` sh
composer require "hacfi/aws-bundle":"dev-master"
```## Default parameters file
This bundle allows you to specify a **default parameters file** so you only have to specify dynamic parameters in your services.
Example:
app/config/config.yml
``` yml
hacfi_aws:
services:
aws.s3:
client: s3
default_parameters_file: "%kernel.root_dir%/Resources/aws/defaults.yml"
```app/Resources/aws/defaults.yml
``` yml
s3.ListObjects:
Bucket: 'lovely_bucket'
`````` php
$buckets = $this->container->get('aws.s3')->listObjects();
```Will automatically add the required `Bucket` parameter with the value `lovely_bucket` before sending the request.
## Resolves request parameters with Symfony service parameters
Example:
``` php
$buckets = $s3->listObjects([
'Bucket' => '%awesome_bucket%',
]);
```will resolve `%awesome_bucket%` to whatever value is in your service container.
This feature can be disabled by setting the configuration option `resolve_parameters` of the client to `false`. Parameters from a default parameters file will also be resolved.
## Configuration
``` yml
hacfi_aws:
config: "%kernel.root_dir%/Resources/aws/aws_credentials.json" # global config - used if service doesn’t overwrite config
default_parameters_file: "%kernel.root_dir%/Resources/aws/defaults.yml" # global default parameters file - used if service doesn’t overwrite default_parameters_file
services:
aws.aws:
client: aws
aws.aws2: ~ # defaults to 'aws' client
aws.autoscaling:
client: autoscaling
config: "%kernel.root_dir%/Resources/aws/aws_credentials.json"
aws.cloudformation:
client: cloudformation
config:
region: "%aws_region%"
key: "%aws_key%"
secret: "%aws_secret%"
aws.cloudfront:
client: cloudfront
default_parameters_file: "%kernel.root_dir%/Resources/aws/cloudfront.yml"
aws.cloudfront_20120505:
client: cloudfront_20120505
aws.cloudhsm:
client: cloudhsm
aws.cloudsearch:
client: cloudsearch
aws.cloudsearch_20110201:
client: cloudsearch_20110201
aws.cloudsearchdomain:
client: cloudsearchdomain
aws.cloudtrail:
client: cloudtrail
aws.cloudwatch:
client: cloudwatch
aws.cloudwatchlogs:
client: cloudwatchlogs
aws.cognito.identity:
client: cognito-identity
aws.cognitoidentity:
client: cognitoidentity
aws.cognito.sync:
client: cognito-sync
aws.cognitosync:
client: cognitosync
aws.codedeploy:
client: codedeploy
aws.config:
client: config
aws.datapipeline:
client: datapipeline
aws.directconnect:
client: directconnect
aws.dynamodb:
client: dynamodb
aws.dynamodb_20111205:
client: dynamodb_20111205
aws.ec2:
client: ec2
aws.ecs:
client: ecs
aws.elasticache:
client: elasticache
aws.elasticbeanstalk:
client: elasticbeanstalk
aws.elasticloadbalancing:
client: elasticloadbalancing
aws.elastictranscoder:
client: elastictranscoder
aws.emr:
client: emr
aws.glacier:
client: glacier
aws.kinesis:
client: kinesis
aws.kms:
client: kms
aws.lambda:
client: lambda
aws.iam:
client: iam
aws.importexport:
client: importexport
aws.machinelearning:
client: machinelearning
aws.opsworks:
client: opsworks
aws.rds:
client: rds
aws.redshift:
client: redshift
aws.route53:
client: route53
aws.route53domains:
client: route53domains
aws.s3:
client: s3
aws.sdb:
client: sdb
aws.ses:
client: ses
aws.sns:
client: sns
aws.sqs:
client: sqs
aws.ssm:
client: ssm
aws.storagegateway:
client: storagegateway
aws.sts:
client: sts
aws.support:
client: support
aws.swf:
client: swf
aws.workspaces:
client: workspaces
```