1 Answer
- Newest
- Most votes
- Most comments
0
To set up HTTPS for your domain directly through AWS instead of Cloudflare, you have several options depending on how your website is hosted:
- If you're using S3 for website hosting:
- S3 website endpoints don't support HTTPS directly
- You'll need to create a CloudFront distribution pointing to your S3 bucket
- Request an SSL/TLS certificate through AWS Certificate Manager (ACM)
- Configure CloudFront to use HTTPS (set "Viewer Protocol Policy" to "Redirect HTTP to HTTPS" or "HTTPS Only")
- Update your DNS records in Route 53 to point to the CloudFront distribution
- If you're using EC2 to host your website:
- Option A (with Load Balancer):
- Create an Application Load Balancer (ALB)
- Request an SSL certificate through ACM and associate it with the HTTPS listener (port 443) on your ALB
- Configure your security groups to allow traffic on port 443
- Point your domain's DNS to the ALB's DNS name
- Option B (directly on EC2 without Load Balancer):
- Install a free SSL certificate using Let's Encrypt and Certbot on your EC2 instance
- For most Linux distributions, you can install certbot and the Route 53 plugin
- Run certbot to obtain and automatically install the certificate on your web server
- Configure your web server (like Nginx or Apache) to use the certificate
- If you're using Elastic Beanstalk:
- You'll need to configure HTTPS with a load balancer
- Obtain an SSL certificate through ACM
- Configure your environment to use HTTPS
Remember that when using ACM certificates, they can only be used with AWS services like CloudFront and Load Balancers, not directly on EC2 instances. For direct EC2 usage, Let's Encrypt is a good free alternative.
Sources
setting up an S3 bucket with https | AWS re:Post
On EC2 Windows Instance, SSL not working | AWS re:Post
HTTPS for ElasticBeanstalk | AWS re:Post
My website still not Secure | AWS re:Post
Relevant content
- AWS OFFICIALUpdated 10 months ago
