Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (30 sloc) 2.08 KB

Using an |S3| Bucket as a Static Web Host with |sdk-php| Version 3

You can host a static website on |S3|. To learn more, see :S3-dg:`Hosting a Static Website on S3 <WebsiteHosting>`.

The following example shows how to:

All the example code for the |sdk-php| Version 3 is available here on GitHub.


Before running the example code, configure your AWS credentials. See :doc:`guide_credentials`.

Get, Set, and Delete the Website Configuration for a Bucket


.. literalinclude:: s3.php.webhost.import.txt
   :language: php

Sample Code

.. literalinclude:: s3.php.webhost.main.txt
   :language: php
You can’t perform that action at this time.