aws/aws-sdk-php-symfony
Composer 安装命令:
composer require aws/aws-sdk-php-symfony
包简介
A Symfony bundle for v3 of the AWS SDK for PHP
README 文档
README
A Symfony bundle for including the AWS SDK for PHP.
Jump To:
Getting Started
Installation
The AWS bundle can be installed via Composer by
requiring theaws/aws-sdk-php-symfony package in your project's composer.json:
{
"require": {
"aws/aws-sdk-php-symfony": "~2.0"
}
}
and adding an instance of Aws\Symfony\AwsBundle to your application's kernel:
class AppKernel extends Kernel { public function registerBundles() { return [ ... new \Aws\Symfony\AwsBundle(), ]; } ... }
Configuration
By default, configuration is handled by the SDK rather than by the bundle, and no validation is performed at compile time. Full documentation of the configuration options available can be read in the SDK Guide.
If AWS_MERGE_CONFIG environment variable is set to true, configuration
validation and merging are enabled. The bundle validates and merges known
configuration options, including for each service. Additional configuration
options can be included in a single configuration file, but merging will fail
if non-standard options are specified in more than once.
To use a service for any configuration value, use @ followed by the service
name, such as @a_service. This syntax will be converted to a service during
container compilation. If you want to use a string literal that begins with @,
you will need to escape it by adding another @ sign.
When using the SDK from an EC2 instance, you can write credentials: ~ to use
instance profile credentials.
This syntax means that temporary credentials will be automatically retrieved
from the EC2 instance's metadata server. It's also the preferred technique for
providing credentials to applications running on that specific context.
Sample configuration can be found in the tests/fixtures folder for YAML, PHP, and XML.
Sample YML Configuration
The sample configuration which can be placed in app/config/config.yml file.
framework: secret: "Rosebud was the name of his sled." aws: version: latest region: us-east-1 credentials: key: not-a-real-key secret: "@@not-a-real-secret" # this will be escaped as '@not-a-real-secret' DynamoDb: region: us-west-2 S3: version: '2006-03-01' Sqs: credentials: "@a_service" CloudSearchDomain: endpoint: https://search-with-some-subdomain.us-east-1.cloudsearch.amazonaws.com services: a_service: class: Aws\Credentials\Credentials arguments: - a-different-fake-key - a-different-fake-secret
Usage
This bundle exposes an instance of the Aws\Sdk object as well as instances of
each AWS client object as services to your symfony application. They are name
aws.{$namespace}, where $namespace is the namespace of the service client.
For instance:
| Service | Instance Of |
|---|---|
| aws.dynamodb | Aws\DynamoDb\DynamoDbClient |
| aws.ec2 | Aws\Ec2\Ec2Client |
| aws.s3 | Aws\S3\S3Client |
| aws_sdk | Aws\Sdk |
The services made available depends on which version of the SDK is installed. To view a full list, run the following command from your application's root directory:
php bin/console debug:container aws
Full documentation on each of the services listed can be found in the SDK API docs.
Getting Help
Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.
- Ask a question on StackOverflow and tag it with
aws-php-sdk - Come join the AWS SDK for PHP gitter
- Open a support ticket with AWS Support
- If it turns out that you may have found a bug, please open an issue
This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums.
Opening Issues
If you encounter a bug with aws-sdk-php-symfony we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of aws-sdk-php-symfony, PHP version and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too.
The GitHub issues are intended for bug reports and feature requests. For help and questions with using aws-sdk-php please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner.
Contributing
We work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our contributing guidelines before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
Resources
aws/aws-sdk-php-symfony 适用场景与选型建议
aws/aws-sdk-php-symfony 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.46M 次下载、GitHub Stars 达 365, 最近一次更新时间为 2015 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「Symfony2」 「amazon」 「sdk」 「aws」 「symfony3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aws/aws-sdk-php-symfony 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aws/aws-sdk-php-symfony 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aws/aws-sdk-php-symfony 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The bundle for easy using json-rpc api on your project
This package includes a script and fail2ban configuration that allows you to use fail2ban when utilizing AWS elastic load balancer (ELB) and an apache webserver.
Bundle Symfony DaplosBundle
Symfony2 Barcode Generator Bundle with Twig function extension
Symfony bundle to connect AWS sns and sqs to create offline queue processing
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
统计信息
- 总下载量: 18.46M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 371
- 点击次数: 20
- 依赖项目数: 25
- 推荐数: 6
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-07-14