O'Reilly logo

Amazon S3 Essentials by Sunil Gulabani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Deploying a Website on S3

Until now, we have seen how to manage buckets, folders, and objects and process operations on them. In this chapter, we will discuss how to deploy our static website on Amazon S3 and access it. We will consider the configuration using the AWS Management Console and the Amazon S3 Java SDK.

Website configuration using the Amazon S3 Java SDK

In previous chapters, we saw how to create a bucket and upload objects (files) to the bucket. Here, we will take a look at how we can create a new bucket, upload index.html and error.html files, and configure the website for the bucket.

To set the bucket website configuration, we have a method in Amazon S3, as follows:

s3.setBucketWebsiteConfiguration(bucketName,new BucketWebsiteConfiguration(indexHTML, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required