In this recipe, we'll learn how to secure an S3 bucket by adding a CloudFront distribution layer. We will enable SSL/TLS on the CloudFront distribution to allow only HTTPS traffic. We will configure this so that we can redirect HTTP requests to HTTPS requests. We will use the default CloudFront certificate (*.cloudfront.net) for this recipe.
Securing S3 using CloudFront and TLS
Getting ready
We need an S3 bucket to practice the steps within this recipe. To set up an S3 bucket, follow these steps:
- Go to the S3 service in the console.
- Create an S3 bucket.
- Upload an index.html file into the bucket.
For the CloudFront distribution with a custom domain and ACM certificate section of this recipe, we need an ACM certificate...