Skip to content

Commit 4676c84

Browse files
Merge pull request #2360 from wallrj/aws-acm-acme-docs
Add tutorial for AWS Certificate Manager ACME endpoints
2 parents eaa1200 + 03cc1a3 commit 4676c84

4 files changed

Lines changed: 307 additions & 0 deletions

File tree

‎.spelling‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,3 +1587,6 @@ pujitha
15871587
requestmanager
15881588
repoints
15891589
textproto
1590+
secp
1591+
prevalidation
1592+
Prevalidation

‎content/docs/manifest.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@
672672
"title": "Securing Ingresses with ZeroSSL",
673673
"path": "/docs/tutorials/zerossl/zerossl.md"
674674
},
675+
{
676+
"title": "AWS ACM ACME",
677+
"path": "/docs/tutorials/aws-acm-acme/README.md"
678+
},
675679
{
676680
"title": "Managing public trust in kubernetes with trust-manager",
677681
"path": "/docs/tutorials/getting-started-with-trust-manager/README.md"

‎content/docs/tutorials/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ for you to learn from. Take a look!
2525
creating an EKS cluster and securing an NGINX deployment with a CyberArk Certificate Manager issued
2626
certificate.
2727
- [Obtaining SSL certificates with the ZeroSSL](./zerossl/zerossl.md): Tutorial describing usage of the ZeroSSL as external ACME server.
28+
- [Issuing public certificates from AWS Certificate Manager using ACME](./aws-acm-acme/README.md): Tutorial on using an ACM ACME endpoint, with External Account Binding and pre-approved domains, as an external ACME server.
2829
- [Managing public trust in Kubernetes with trust-manager](./getting-started-with-trust-manager/README.md): Learn how to deploy and configure trust-manager to automatically distribute your approved Public CA configuration to your Kubernetes cluster.
2930
- [Learn how to set Certificate defaults automatically](./certificate-defaults/README.md): Learn how to use Kyverno `ClusterPolicy` to set default values for cert-manager `Certificates`.
3031

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
---
2+
title: Issue public certificates from AWS Certificate Manager (ACM) using ACME
3+
description: |
4+
Learn how to configure cert-manager to request publicly trusted
5+
certificates from an AWS Certificate Manager (ACM) ACME endpoint,
6+
using External Account Binding and pre-approved domain validation.
7+
---
8+
9+
In this tutorial you will learn how to use cert-manager with an
10+
[AWS Certificate Manager (ACM) ACME endpoint](https://docs.aws.amazon.com/acm/latest/userguide/acm-acme.html).
11+
12+
ACM can run a managed, RFC 8555 compliant ACME server for your AWS account.
13+
It issues publicly trusted certificates from Amazon Trust Services
14+
to workloads that run outside the AWS managed services,
15+
such as Kubernetes clusters, on-premises servers, and hybrid environments.
16+
cert-manager talks to it like any other ACME server.
17+
18+
*Last Verified: 12 November 2026*
19+
20+
## How ACM ACME differs from Let's Encrypt
21+
22+
Most public ACME servers, such as Let's Encrypt, require the client to prove
23+
control of each domain every time it requests a certificate.
24+
cert-manager does that by solving HTTP-01 or DNS-01 challenges.
25+
26+
ACM ACME endpoints work differently:
27+
28+
- **Domains are approved in advance.** An AWS administrator creates an
29+
*ACME domain validation* for each domain, backed by a persistent CNAME record.
30+
The ACME server then returns authorizations that are already `valid`,
31+
so cert-manager never needs to create a Challenge resource.
32+
- **Every ACME account must use External Account Binding (EAB).**
33+
Each EAB is bound to an IAM role which ACM assumes when it issues or revokes a certificate.
34+
You control who can issue certificates with IAM policies and Service Control Policies,
35+
and every issuance is logged in CloudTrail.
36+
- **Certificates are valid for 45 days.**
37+
cert-manager renews them automatically using its default renewal settings.
38+
- **Issuance can take up to two minutes.**
39+
cert-manager waits for the ACME server to finish, so no extra configuration is needed.
40+
41+
Use ACM ACME when you want publicly trusted certificates for Kubernetes workloads
42+
and you want AWS to govern which clusters may issue certificates for which domains.
43+
If you only need certificates for AWS managed services such as
44+
Elastic Load Balancing or CloudFront, use ACM directly instead.
45+
If you need a private CA, use the
46+
[aws-privateca-issuer](https://github.com/cert-manager/aws-privateca-issuer) instead.
47+
48+
## Prerequisites
49+
50+
- An AWS account and the [AWS CLI](https://aws.amazon.com/cli/) configured with permissions to manage ACM and IAM.
51+
- A public DNS zone that you control. The examples use a Route 53 hosted zone,
52+
which lets ACM create the validation CNAME record for you.
53+
- A Kubernetes cluster with [cert-manager installed](../../installation/README.md).
54+
55+
## Step 1: Create an ACME endpoint
56+
57+
Create an endpoint with pre-approved authorization.
58+
`--contact REQUIRED` makes the endpoint reject ACME accounts that do not supply an email address.
59+
`AllowedKeyAlgorithms` restricts the key types that the endpoint will sign.
60+
61+
```bash
62+
aws acm create-acme-endpoint \
63+
--authorization-behavior PRE_APPROVED \
64+
--contact REQUIRED \
65+
--certificate-authority '{
66+
"PublicCertificateAuthority": {
67+
"AllowedKeyAlgorithms": ["RSA_2048", "EC_prime256v1", "EC_secp384r1"]
68+
}
69+
}'
70+
```
71+
72+
Note the `AcmeEndpointArn` in the output.
73+
Then retrieve the ACME directory URL of the endpoint:
74+
75+
```bash
76+
aws acm describe-acme-endpoint \
77+
--acme-endpoint-arn arn:aws:acm:${AWS_REGION}:${AWS_ACCOUNT_ID}:acme-endpoint/${ACME_ENDPOINT_ID} \
78+
--query 'AcmeEndpoint.EndpointUrl' --output text
79+
```
80+
81+
The URL has the form `https://acm-acme-enroll.<region>.api.aws/<uuid>/directory`.
82+
The UUID in the URL is not the endpoint ID from the ARN, so copy the URL exactly as returned.
83+
You will use it as the `server` field of the cert-manager Issuer.
84+
85+
## Step 2: Pre-approve your domain
86+
87+
Create an ACME domain validation for the domain, or parent domain, of the certificates you want to issue.
88+
The `DomainScope` controls whether the exact domain, its subdomains, and wildcards are allowed.
89+
If you supply a Route 53 `HostedZoneId`, ACM creates the validation CNAME record for you.
90+
Otherwise, read the CNAME name and value from the output and create the record yourself.
91+
92+
```bash
93+
aws acm create-acme-domain-validation \
94+
--acme-endpoint-arn arn:aws:acm:${AWS_REGION}:${AWS_ACCOUNT_ID}:acme-endpoint/${ACME_ENDPOINT_ID} \
95+
--domain-name example.com \
96+
--prevalidation-options '{
97+
"DnsPrevalidation": {
98+
"DomainScope": {
99+
"ExactDomain": "ENABLED",
100+
"Subdomains": "ENABLED",
101+
"Wildcards": "DISABLED"
102+
},
103+
"HostedZoneId": "'"${HOSTED_ZONE_ID}"'"
104+
}
105+
}'
106+
```
107+
108+
Wait until the validation status is `VALID`. This can take up to 72 hours,
109+
but is usually much faster when ACM manages the Route 53 record.
110+
111+
```bash
112+
aws acm describe-acme-domain-validation \
113+
--acme-domain-validation-arn ${ACME_DOMAIN_VALIDATION_ARN} \
114+
--query 'AcmeDomainValidation.Status' --output text
115+
```
116+
117+
> ⚠️ The CNAME record must stay in place for as long as you want to issue certificates.
118+
> If it is removed, new Orders fail with the ACME error `urn:ietf:params:acme:error:dns`.
119+
120+
## Step 3: Create an IAM role and EAB credentials
121+
122+
ACM assumes an IAM role on behalf of the ACME account each time it issues a certificate.
123+
Create a role with the following trust policy:
124+
125+
```json
126+
{
127+
"Version": "2012-10-17",
128+
"Statement": [
129+
{
130+
"Effect": "Allow",
131+
"Principal": { "Service": "acm-acme.amazonaws.com" },
132+
"Action": ["sts:AssumeRole", "sts:TagSession", "sts:SetSourceIdentity"],
133+
"Condition": {
134+
"StringLikeIfExists": { "sts:SourceIdentity": "acm-acme-*" }
135+
}
136+
}
137+
]
138+
}
139+
```
140+
141+
Attach a permissions policy that allows `acm:RequestCertificate`.
142+
Add `acm:RevokeCertificate` only if you want this account to be able to revoke certificates.
143+
144+
Then create an External Account Binding bound to that role.
145+
The optional expiration limits how long the EAB can be used to register new ACME accounts.
146+
It does not affect accounts that have already registered.
147+
148+
```bash
149+
aws acm create-acme-external-account-binding \
150+
--acme-endpoint-arn arn:aws:acm:${AWS_REGION}:${AWS_ACCOUNT_ID}:acme-endpoint/${ACME_ENDPOINT_ID} \
151+
--role-arn arn:aws:iam::${AWS_ACCOUNT_ID}:role/AcmeIssuanceRole \
152+
--expiration '{"Value": 7, "Type": "DAYS"}'
153+
```
154+
155+
Retrieve the credentials:
156+
157+
```bash
158+
aws acm get-acme-external-account-binding-credentials \
159+
--acme-external-account-binding-arn ${ACME_EAB_ARN}
160+
```
161+
162+
The output contains a `KeyId` and a `MacKey`.
163+
`KeyId` goes in the `keyID` field of the Issuer.
164+
`MacKey` goes in a Secret.
165+
166+
Create one EAB per cluster, so that you can revoke a single cluster's access without affecting the others.
167+
168+
## Step 4: Store the MAC key in a Secret
169+
170+
cert-manager expects the MAC key in a Secret, encoded as a base64 URL string.
171+
The `MacKey` that ACM returns is already in this encoding, so store it as it is.
172+
173+
```bash
174+
kubectl create secret generic acm-acme-eab \
175+
--namespace cert-manager \
176+
--from-literal=secret='<MacKey from the previous step>'
177+
```
178+
179+
## Step 5: Create a ClusterIssuer
180+
181+
```yaml
182+
apiVersion: cert-manager.io/v1
183+
kind: ClusterIssuer
184+
metadata:
185+
name: acm-acme
186+
spec:
187+
acme:
188+
# The EndpointUrl from Step 1, copied exactly
189+
server: https://acm-acme-enroll.<region>.api.aws/<uuid>/directory
190+
# Required when the endpoint was created with --contact REQUIRED
191+
email: platform-team@example.com
192+
privateKeySecretRef:
193+
name: acm-acme-account-key
194+
externalAccountBinding:
195+
# The KeyId from Step 3
196+
keyID: <KeyId>
197+
keySecretRef:
198+
name: acm-acme-eab
199+
key: secret
200+
# The ACM ACME endpoint pre-approves domains, so cert-manager never
201+
# needs to solve a challenge. No solvers are required.
202+
solvers: []
203+
```
204+
205+
```bash
206+
kubectl apply -f clusterissuer.yaml
207+
kubectl describe clusterissuer acm-acme
208+
```
209+
210+
The ClusterIssuer is `Ready` once cert-manager has registered the ACME account.
211+
If registration fails, check that the `keyID` and Secret match the EAB credentials,
212+
that the EAB has not expired, and that `email` is set.
213+
214+
## Step 6: Request a certificate
215+
216+
```yaml
217+
apiVersion: cert-manager.io/v1
218+
kind: Certificate
219+
metadata:
220+
name: www-example-com
221+
namespace: default
222+
spec:
223+
secretName: www-example-com-tls
224+
dnsNames:
225+
- www.example.com
226+
issuerRef:
227+
name: acm-acme
228+
kind: ClusterIssuer
229+
privateKey:
230+
# Must be one of the AllowedKeyAlgorithms of the endpoint.
231+
# ECDSA P-256 is the default in the ACM console; cert-manager
232+
# defaults to RSA 2048 if privateKey is omitted.
233+
algorithm: ECDSA
234+
size: 256
235+
# ACM rejects the key encipherment usage for ECDSA keys, but cert-manager
236+
# requests it by default. Set the usages explicitly to leave it out.
237+
usages:
238+
- digital signature
239+
- server auth
240+
```
241+
242+
```bash
243+
kubectl apply -f certificate.yaml
244+
kubectl wait --for=condition=Ready certificate/www-example-com --timeout=5m
245+
```
246+
247+
Because the domain is pre-approved, the Order goes straight from `pending` to `ready`
248+
and cert-manager finalizes it without creating any Challenge resources.
249+
Issuance can take up to two minutes.
250+
251+
You can confirm that ACM issued the certificate by listing certificates with the `ACME` origin.
252+
By default `list-certificates` only shows RSA certificates,
253+
so use `--includes` to show the other key types too:
254+
255+
```bash
256+
aws acm list-certificates \
257+
--certificate-key-pair-origins ACME \
258+
--includes keyTypes=EC_prime256v1,EC_secp384r1,RSA_2048
259+
```
260+
261+
## Troubleshooting
262+
263+
See [Troubleshooting Issuing ACME Certificates](../../troubleshooting/acme.md) for general guidance.
264+
These problems are specific to ACM ACME endpoints:
265+
266+
- **The Order fails with `urn:ietf:params:acme:error:dns`.**
267+
The validation CNAME record has been removed or changed. Recreate it.
268+
- **The Order fails with `badCSR` and `Disallowed Key Usage: keyEncipherment`.**
269+
The Certificate uses an ECDSA key with cert-manager's default usages.
270+
Set `usages` to `digital signature` and `server auth`, as shown in Step 6.
271+
- **The Order fails with `urn:ietf:params:acme:error:unauthorized` or a similar rejection.**
272+
The requested domain is not covered by a `VALID` domain validation on this endpoint,
273+
or the certificate key algorithm is not in `AllowedKeyAlgorithms`.
274+
- **The Order creates a Challenge, or the Order has the event `Failed to determine a valid solver configuration`.**
275+
The ACME server returned a `pending` authorization for one of the domains,
276+
which means that domain is not pre-approved. Add a domain validation for it, or fix the `DomainScope`.
277+
- **The ClusterIssuer is not `Ready` and reports an account registration error.**
278+
Check the EAB `KeyId`, the Secret contents, the EAB expiration, and that `email` is set.
279+
- **Issuance fails with an access denied error after the Order is finalized.**
280+
The IAM role trust policy or permissions are wrong, or a Service Control Policy blocks `acm:RequestCertificate`.
281+
Look for the `IssueCertificate` event in CloudTrail.
282+
283+
## Limitations
284+
285+
- ACM does not renew ACME certificates. cert-manager handles renewal.
286+
- ACME certificates cannot be attached to Elastic Load Balancing, CloudFront, or API Gateway.
287+
- Revocation is only possible through the ACME protocol. cert-manager does not revoke certificates.
288+
- A certificate can contain at most 100 domain names.
289+
- ACM endpoints are regional. Create the endpoint in the Region closest to your cluster,
290+
or use [AWS PrivateLink](https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-privatelink.html)
291+
to reach it without traversing the public internet.
292+
293+
## Further reading
294+
295+
- [AWS: ACME certificate automation in ACM](https://docs.aws.amazon.com/acm/latest/userguide/acm-acme.html)
296+
- [AWS: ACME domain validation](https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-domain-validation.html)
297+
- [AWS: External Account Binding](https://docs.aws.amazon.com/acm/latest/userguide/acm-acme-eab.html)
298+
- [AWS: Troubleshooting ACME](https://docs.aws.amazon.com/acm/latest/userguide/troubleshooting-acme.html)
299+
- [cert-manager: ACME issuer configuration](../../configuration/acme/README.md)

0 commit comments

Comments
 (0)