<?php
require 'vendor/autoload.php';
use Aws\Resource\Aws;
$aws = new Aws([
'region' => 'us-west-2',
'version' => 'latest',
'profile' => 'your-credential-profile',
]);
$bucket = $aws->s3->bucket('your-bucket');
$object = $bucket->putObject([
'Key' => 'images/image001.jpg',
'Body' => fopen('/path/to/image.jpg', 'r'),
]);
The core AWS SDK for PHP is composed of service client objects that have methods corresponding 1-to-1 with operations in the service’s API. This project builds build upon the SDK to add new types of objects that allow you to interact with the AWS service APIs in a more resource-oriented way. This allows you to use a more expressive syntax when working with AWS services, because you are acting on objects that understand their relationships with other resources and that encapsulate their identifying information.
Yes!
Preview the AWS Resource APIs for PHP →
AWS Resource APIs for PHP (GitHub) →