Stop 08 · DNS, CDN & Edge ServicesTopics · 7/7

AWS Certificate Manager (ACM)

Part of the AWS Roadmap

In short

Browsers now warn people away from any site without HTTPS. ACM gives you public TLS certificates for AWS services at no extra cost and renews them for you, so the padlock never quietly expires.

ACM issues and renews public TLS certificates at no extra cost for use with AWS services such as CloudFront, load balancers and API Gateway. Certificates for CloudFront must be requested in the us-east-1 Region.

The jaadu proudly hangs a freshly stamped, gold-sealed licence frame on the wall of a small shop as a customer smiles at the counter.

Think of it like this

The shop's trade licence on the wall

A customer trusts a chemist in Jaipur partly because the drug licence is framed on the wall, issued by an authority everyone trusts. A TLS certificate is that framed licence for your domain. ACM is the office that issues it after checking you really own the shop, and it posts you the renewed one before the old one runs out.

Watch it happen

Getting a certificate with DNS validation

Request
CNAME given
Record added
Issued
Auto renewal

1/5Request a certificate for priyabakes.in and *.priyabakes.in in us-east-1, because it will be used with CloudFront.

The big ideas

What you need to know

Public certs at no extra cost

Public certificates used with integrated services such as CloudFront, ALB and API Gateway don't add a charge. You pay for the services that use them.

us-east-1 for CloudFront

CloudFront only accepts certificates from US East (N. Virginia). For an ALB in Mumbai, request the certificate in ap-south-1.

Prefer DNS validation

Email validation needs a human click each time. DNS validation lets renewals happen on their own.

Wildcards

*.priyabakes.in covers shop.priyabakes.in and api.priyabakes.in, but not the bare priyabakes.in. Add both names.

See it in code

Walk through the code

bash
1# Request a cert for CloudFront (must be us-east-1)2aws acm request-certificate \3  --region us-east-1 \4  --domain-name priyabakes.in \5  --subject-alternative-names "*.priyabakes.in" \6  --validation-method DNS7 8# See the CNAME you need to create9aws acm describe-certificate \10  --region us-east-1 \11  --certificate-arn arn:aws:acm:us-east-1:111122223333:certificate/abcd-1234 \12  --query "Certificate.DomainValidationOptions[].ResourceRecord"

1/4The Region matters. us-east-1 because this certificate is for CloudFront.

AWS CLI v2. Once the CNAME exists in Route 53, the status moves from PENDING_VALIDATION to ISSUED.

Save yourself the pain

Common mistakes

Oops

Requesting the certificate in ap-south-1 and then looking for it in the CloudFront settings.

Do this instead

CloudFront only lists certificates from us-east-1. Request a second one there.

Oops

Deleting the validation CNAME after the certificate is issued.

Do this instead

Leave it in place. ACM uses it again at renewal time.

Your mission

Secure a subdomain

~15 min

Quick check

You need HTTPS on a CloudFront distribution for priyabakes.in. Where must the ACM certificate be?

Go deeper

  1. 1Request a certificate with DNS validation for a domain you own.
  2. 2Attach it to a load balancer or CloudFront distribution and test HTTPS.
  3. 3Learn why DNS validation lets ACM renew certificates automatically.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge