AWS Certificate Manager - How to create public certificate for internal ALB? - amazon-web-services

I don't want to use private CA and create private certificates. Is it possible to create public certificate using ACM for internal (NOT internet facing) ALB ? If yes then how can it be created ?
As per below ACM FAQ looks like it should be possible but i am not able to figure out how can it be created ?
Q: Can I use public certificates for internal Elastic Load Balancing load balancers with no public internet access?
Yes, but you can also consider using ACM Private CA to issue private certificates that ACM can renew without validation. See Managed Renewal and Deployment for details about how ACM handles renewals for public certificates that are not reachable from the Internet and private certificates.

You would have to add a Route53 private zone to your VPC that matches the domain name of the certificate, with an ALIAS record pointing at the load balancer that matches the FQDN in the SSL certificate. All connections to the internal load balancer would have to use that domain name in order for the load balancer to serve the certificate.

Related

Enable https on ec2 public DNS

What is the best approach to enable https on ec2 public dns? I just have single instance running so i don't think adding load balancer is good approach and I don't have any domain name to point to my instance. I want to enable https on instance public DNS.
What is the best approach to enable https on ec2 public dns?
You can't do this, as the public DNS provided by AWS does not belong to you. The DNS belongs to AWS and only AWS can have a valid SSL certificate for it.
To have a valid public SSL certificate for HTTPS you need your own domain that you control. Then you have to use a third party service (ACM can't be used on EC2 instances, unless in enclave) to get a SSL cert for your domain. A popular choice is https://letsencrypt.org/ with certbot which provides free SSL certificates. By the way, StackOverlow is using letsencrypt as its SSL cert provider. Having the SSL cert you can setup nginx to server your application using HTTPs, or itegrate SSL certificates directly with your application.
If you don't want to do the above, you have to front your instance with load balancer, CloudFront or API Gateway. Having load balancer allows you to use ACM and easily get and provision SSL certificates You still need your own domain of course. Using load balancer is the easiest to setup. With CloudFront and API Gateway there are more things to consider.

AWS Install SSL Certificate from Certificate Manager on EC2

I am using AWS and I created an Instance in EC2 and created a SSL Certificate in Certificate Manager, I have a domain from whois.com which I was able to connect to my instance using Route 53.
I am now trying to install the SSL Certificate to my EC2 instance and have googled a bunch on tutorials on the subject, but they all are super confusing and don't seem to work, must of them say I need to use a Load Balancer, but either I am missing a step or something I am doing is wrong because the SSL certificate is not working, http works like a charm, https is not working at all.
Is someone able to point me in the right direction?
AWS do not allow the certificates to be downloaded for ACM public CA so you are limited with where it can be attached.
You cannot use a public ACM certificate directly in your EC2 instance. The following resources support attachment for HTTPS of your application:
Elastic Load Balancer (ALB, CLB or Network Load Balancer with a TLS target group)
CloudFront Distribution
API Gateway
If you do not want to use one of these resources then the following 3 options are available for you:
Use a free SSL CA to generate the SSL for your EC2 instance such as certbot
Purchase a SSL from another CA and install on your host
Use AWS ACM Private CA (Although this can be expensive)

Can I use a self-signed certificate on an AWS instance if the load balancer has a valid CA certificate?

We are using Cloudflare, which points to an AWS load balancer in front of an EC2 instance. The goal here is to have end-to-end encryption but I am trying to understand which parts of this setup actually require a certificate from a Certificate Authority, and whether or not we can use a complete set of free certificates between Cloudflare and AWS.
Cloudflare - We can use their free Universal SSL certificate to secure the traffic from Cloudflare to the load balancer.
AWS Load Balancer - We can use a free AWS certificate which is attached to the load balancer. This same certificate cannot be installed on the EC2 instance.
EC2 Instance - Can we use a self-signed certificate here, or do we need to continue purchasing certificates from a recognised authority? My understanding here is that, yes, we can just use a self-signed certificate and everything will be secure without raising any warnings about the self-signed nature of the certificate, as long as the load balancer has a valid CA certificate from Amazon or other authority.
Cloudflare is set to Full SSL mode which does not validate the origin certificate and will allow it to be self-signed, but I assume this only applies to the load balancer in our case.
You can use whichever SSL you want on the instance, self signed or from a certificate authority.
By doing this the data will be encrypted in transit between your load balancer and the EC2 instance.
It is only the AWS services that require either an ACM cert or an uploaded cert from a valid certificate authority.
Ensure that your servers are kept private if you're using self signed certificates.

aws private zone for cross vpc connections and ssl cert

I am attempting to use an internal aws route53 dns record to provide certificates for my internal routing inside and between VPC. I have created an internal zone in route53 (site.internal) which I was hoping i could then use api.site.internal for applications routing between the zones and internally as well as using a free wildcard certificate for all the subdomains i.e api. .. So, the idea was :
create internal route53 zone
create cname to point at my ALB
generate wildcard certificate for (*.site.internal)
Then using this internal dns for curls etc from other vpc's and within the same vpc??
So my question is.. will this work and does it make sense, and allow secure ssl traffic internally using aws certificates?
Thanks in advance and for the help
Yes. In general this is how private Route53 hosted zones work. Note that I'm not sure if AWS's "domain" option for SSL authentication will work with a private zone for issuing ACM certificates - you may want to use email authentication instead.
That having been said, remember that you'll still need to set up VPC peering between your VPCs. You can route the traffic to an IP or load balancer, but if that box can't be reached from your VPC it won't matter.

Connect SSL Cert to Route53 Hosted Domain

For some reason I cannot find a yes or no if this is even possible but I am assuming that it would be. I have a domain through AWS that was purchased through AWS Route53. I also created an SSL Cert through AWS Certificate Manager. Now I'm just trying to add that certificate to the domain. I would think that since it is all interconnected that it would just been applied after I approved it and it finished the setup but alas, it has not. So my question is how/where do I connect my SSL Cert to my Route53 hosted domain?
SSL certificates are not connected to a domain's DNS record (via Route 53).
Instead, they are connected to one or more specific infrastructure components.
SSL certificates that you create from ACM can be used with:
AWS Elastic Load Balancer
AWS CloudFront
Create your infrastructure including one or more of those components and then attach your ACM SSL certificate to that.
See the ACM FAQ: https://aws.amazon.com/certificate-manager/faqs/