Enabling HTTPS for a web server on an EC2 instance
In the Launching an EC2 instance with a web server using user data recipe in Chapter 5, we launched an EC2 instance with a web server without enabling HTTPS. In this recipe, we will demonstrate how to enable HTTPS on that web server using a self-signed certificate. This will help us to understand the fundamental concepts of enabling HTTPS on an EC2 instance. However, for practical applications, it is advisable to use methods outlined in other recipes within this chapter, which involve certificates signed by a Certificate Authority (CA), such as AWS Certificate Manager (ACM).
Getting ready
We need the following to successfully complete this recipe:
- A working AWS account,
awsseccb-sandbox-1, and a user,awsseccbadmin1, as described in the Technical requirements section. - An EC2 instance called
Cloudericks Web Server, launched in the Launching an EC2 instance with a web server using user data recipe from Chapter 5.
...