アマゾン AWS 入門
メモ ちょこちょこ追記していく予定です。Amazon AWSの使い方
注意)基本的にamazonのdocumentationは全て英語です。
参照: http://aws.amazon.com/articles/PHP/4261
動画でざっくり把握してみる:
http://aws.amazon.com/articles/4262?_encoding=UTF8&jiveRedirect=1
最初の二個を見ましたが、かなりわかり易いです。
- amazon sdkのインストール方法はいくつかあるが、手動でサーバーへupするには
- http://aws.amazon.com/sdkforphp/ からダウンロードしてサーバーへup
- coreserverで使う時は、http://www.coreserver.jp/help/index.php/phpcgi/ でセーフモード回避
- 始める前に、
In order to use the AWS SDK for PHP, you need your AWS Access Key ID and Secret Access Key.
なので、それを取得。http://aws.amazon.com/articles/PHP/4261 に従う。
/** * Constant: AWS_KEY * Amazon Web Services Key. Found in the AWS Security Credentials. You can also pass this value as the first parameter to a service constructor. */ define('AWS_KEY', ''); /** * Constant: AWS_SECRET_KEY * Amazon Web Services Secret Key. Found in the AWS Security Credentials. You can also pass this value as the second parameter to a service constructor. */ define('AWS_SECRET_KEY', '');
のところに AWS Access Key ID and Secret Access Keyを入れる
- sandbox.php
<?php header("Content-type: text/plain; charset=utf-8"); require_once '/path/to/sdk/sdk.class.php'; $time_start=microtime(true); #ここに $time=microtime(true)-$time_start; echo PHP_EOL . PHP_EOL . $time . PHP_EOL; ?>
- PHP関連のdocumentation: http://aws.amazon.com/php
- ブックマークしておくと便利なhelp: http://docs.amazonwebservices.com/AWSSDKforPHP/latest/