Welcome to Day 24 of the 30 Days AWS Security Challenge. Back on Day 10 we talked about encrypting data in transit using TLS. Today we look at the service that makes running TLS on AWS genuinely easy: AWS Certificate Manager, or ACM.
Why Certificates Used to Be a Pain
TLS certificates are what let a browser show that padlock icon and trust that it's actually talking to your real server, not an impersonator. Before services like ACM existed, managing certificates meant generating a certificate signing request, buying a certificate from a third party authority, manually installing it on your servers, and then remembering to repeat that entire process before it expired, usually once a year. Miss the expiration date, and your site suddenly shows visitors a scary browser warning instead of your application.
What ACM Actually Does
ACM handles the entire lifecycle of a TLS certificate for you: requesting it, validating that you actually own the domain, issuing it, and critically, renewing it automatically before it expires. For certificates used with supported AWS services, there's no manual renewal step to remember at all, ACM handles it in the background.
ACM integrates directly with services like:
- CloudFront, for encrypting traffic to your content delivery network
- Application Load Balancers and Network Load Balancers, for encrypting traffic to your application
- API Gateway, for encrypting traffic to your APIs
Requesting a Certificate
To request a public certificate, go to Certificate Manager > Request a certificate, choose Request a public certificate, and enter the domain name you want to secure, like www.example.com . You can request a certificate covering multiple domains or a wildcard certificate covering an entire subdomain pattern, like *.example.com , in a single request.
Validating Domain Ownership
Before issuing a certificate, ACM needs proof that you actually control the domain. There are two ways to do this:
- DNS validation, where ACM gives you a specific DNS record to add to your domain. Once that record is in place, ACM detects it and issues the certificate. If your domain is managed in Route 53, ACM can add this record for you automatically with a single click.
- Email validation, where AWS sends a validation email to addresses associated with the domain, requiring someone to click a confirmation link.
DNS validation is the better option whenever available, since it also enables automatic renewal without any further action. Email validation requires clicking a new confirmation link every time the certificate renews, which reintroduces exactly the manual step ACM is meant to remove.
Automatic Renewal
This is where ACM earns its keep. For a DNS validated certificate attached to a supported AWS service, ACM automatically renews it before expiration, with no action required from you. Since the whole point of TLS is uninterrupted, trusted encryption, not having to track certificate expiration dates on a calendar somewhere is a meaningful reduction in operational risk, not just a convenience.
Attaching a Certificate to Your Resources
Once issued, using the certificate is straightforward. For a load balancer, go to the listener configuration, choose HTTPS as the protocol, and select your ACM certificate from the dropdown. For CloudFront, you select the certificate when configuring your distribution's alternate domain names. In both cases, ACM handles the certificate itself, you just point the resource at it.
A Few Things Worth Knowing
ACM certificates issued for use with AWS services are free, there's no separate cost for the certificate itself, only for the underlying resources using it. One limitation worth knowing: ACM certificates can't be exported and used outside of AWS, like installing them directly on a server you manage yourself outside of AWS's supported integrations. If you need a certificate for something outside AWS entirely, you'd still need a traditional certificate authority for that specific case.
A Practical Example
Say you're setting up HTTPS for a new application behind an Application Load Balancer. You request a certificate for app.example.com through ACM, validate it via DNS since your domain is already in Route 53, and once issued, attach it directly to your load balancer's HTTPS listener. From that point forward, your application serves encrypted traffic, and you never have to think about certificate renewal again, since ACM handles it automatically in the background.
Key Takeaways
- ACM handles the full certificate lifecycle, requesting, validating, and renewing, without manual intervention
- DNS validation is preferable to email validation, since it also enables fully automatic renewal
- ACM integrates directly with CloudFront, load balancers, and API Gateway
- Certificates for use with AWS services are free, removing cost as a reason to skip proper TLS setup
- ACM certificates can't be exported for use outside AWS, so a separate certificate authority is still needed for external use cases
Tomorrow we look at authentication from the user facing side, with Amazon Cognito and how it handles sign up, sign in, and user security for your applications.
Loading article