A small Proof of Concept of talking to an S3 Bucket using PHP.
-
Clone this project:
git clone https://github.com/aletzo/s3-php.git s3-php
-
Install dependencies:
composer install
-
Copy
config/aws_dist.php
toconfig/aws.php
and adjust accordingly. -
Copy
images_dist.php
toimages.php
and adjust accordingly (if needed).
There are 3 scripts that can be executed from the command line:
- Create a text file, list it and read its content:
php index.php
- Upload to an S3 bucket all JPEG images that are located inside directory
picsum
:
php picsum_upload.php
- Read a list of remote images and store them locally (no S3 bucket involved):
php save.php