| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The following tasks guide you through using the PHP classes to send authenticated requests using your AWS account or IAM user credentials.
Making Requests Using Your AWS Account or IAM user Credentials
|
1 |
Create an instance of the |
|
2 |
Execute one of the |
The following PHP code sample demonstrates the preceding tasks and illustrate how the
AmazonS3 client sends a request to list all object keys in a
bucket.
// Instantiate the class. $s3 = new AmazonS3(); // Use the high-level API. $response = $s3->get_object_list($bucket);
Note
You can create the AmazonS3 client without providing your security
credentials. Requests sent using this client are anonymous requests, without a
signature. Amazon S3 returns an error if you send anonymous requests for a
resource that is not publicly available.
For working examples, see Working with Amazon S3 Objects and Working with Amazon S3 Buckets. You can test these examples using your AWS Account or IAM user credentials.
For example, to list all the object keys in your bucket, see Listing Keys Using the AWS SDK for PHP.