Skip to content

Instantly share code, notes, and snippets.

@claudioc
Created January 7, 2021 18:56
Show Gist options
  • Save claudioc/aed152ceebdc8936dd0f4a0009893cdc to your computer and use it in GitHub Desktop.
Save claudioc/aed152ceebdc8936dd0f4a0009893cdc to your computer and use it in GitHub Desktop.
Fastest way to create an EC2 machine with Amazon provided SSL certificates (?)
Since you can only use ACM provided certificates from (A/N/E)LB or CloudFormation, I think this
could be the easiest way (using ALB).
- (EC2) Create a security group that only accepts HTTPS
- (EC2) Create a security group that only accepts HTTP connection from the security group above
- (EC2) Create the EC2 instance and bind it to the the security group above
- (EC2) Create a Target Group and use the above EC2 as the target inside it
- (ACM) Create the SSL certificate in ACM (hint: you can create it directly from Route53)
- (EC2) Create an Application Load Balancer in the same EC2's AZs using the above target group and the SSL certificate
- (Route53) Edit your DNS zone to add the LB A record (use its Alias and autocomplete)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment