アマゾン AWS 入門

メモ ちょこちょこ追記していく予定です。Amazon AWSの使い方
注意)基本的にamazonのdocumentationは全て英語です。


参照: http://aws.amazon.com/articles/PHP/4261


動画でざっくり把握してみる:
http://aws.amazon.com/articles/4262?_encoding=UTF8&jiveRedirect=1
最初の二個を見ましたが、かなりわかり易いです。

 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 に従う。

  • config-sample.inc.phpをconfig.inc.phpへrenameし、
/**
 * 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を入れる

<?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;
?>