aws apache+ php环境,Amazon Web Service SDK:PHP AWS SDK官方库

AWS SDK for PHP - Version 3

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

The AWS SDK for PHP makes it easy for developers to access Amazon Web Services in their PHP code, and build robust applications and software using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can get started in minutes by installing the SDK through Composer or by downloading a single zip or phar file from our latest release.

Resources

User Guide – For both getting started and in-depth SDK usage information

API Docs – For details about operations, parameters, and responses

Blog – Tips & tricks, articles, and announcements

Sample Project - A quick, sample project to help get you started

Forum – Ask questions, get help, and give feedback

Issues – Report issues, submit pull requests, and get involved (see Apache 2.0 License)

@awsforphp – Follow us on Twitter

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

Opening Issues

If you encounter a bug with aws-sdk-php 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, 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.

Features

Provides easy-to-use HTTP clients for all supported AWS services, regions, and authentication protocols.

Is built on Guzzle, and utilizes many of its features, including persistent connections, asynchronous requests, middlewares, etc.

Provides convenience features including easy result pagination via Paginators, Waiters, and simple Result objects.

Provides a multipart uploader tool for Amazon S3 and Amazon Glacier that can be paused and resumed.

Provides an Amazon S3 Stream Wrapper, so that you can use PHP's native file handling functions to interact with your S3 buckets and objects like a local filesystem.

Provides the Amazon DynamoDB Session Handler for easily scaling sessions on a fast, NoSQL database.

Automatically uses IAM Instance Profile Credentials on configured Amazon EC2 instances.

Getting Started

Sign up for AWS – Before you begin, you need to sign up for an AWS account and retrieve your AWS credentials.

Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having PHP >= 5.5. We highly recommend having it compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).

Install the SDK – Using Composer is the recommended way to install the AWS SDK for PHP. The SDK is available via Packagist under the aws/aws-sdk-php package. Please see the Installation section of the User Guide for more detailed information about installing the SDK through Composer and other means.

Using the SDK – The best way to become familiar with how to use the SDK is to read the User Guide. The Getting Started Guide will help you become familiar with the basic concepts.

Quick Examples

Create an Amazon S3 client

// Require the Composer autoloader.

require 'vendor/autoload.php';

use Aws\S3\S3Client;

// Instantiate an Amazon S3 client.

$s3 = new S3Client([

'version' => 'latest',

'region' => 'us-west-2'

]);

Upload a file to Amazon S3

// Upload a publicly accessible file. The file size and type are determined by the SDK.

try {

$s3->putObject([

'Bucket' => 'my-bucket',

'Key' => 'my-object',

'Body' => fopen('/path/to/file', 'r'),

'ACL' => 'public-read',

]);

} catch (Aws\S3\Exception\S3Exception $e) {

echo "There was an error uploading the file.\n";

}

Related AWS Projects

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值