I Issued an Amazon N2 Certificate (SFG2) in ACM and Tried Out mTLS

I Issued an Amazon N2 Certificate (SFG2) in ACM and Tried Out mTLS

ACM can issue Amazon N2 certificates with two root hierarchies. I issued one from the SFG2 hierarchy and confirmed clientAuth in its extended key usage and a working mTLS connection with OpenSSL. The verifying side must add the root.
2026.11.25

This page has been translated by machine translation. View original

Introduction

On November 21, 2026, AWS Certificate Manager (ACM) began supporting issuance of Amazon N2 certificates.

https://aws.amazon.com/about-aws/whats-new/2026/11/acm-amazon-n2-certificates/

Amazon N2 certificates are certificates for authentication outside of browsers, such as mTLS, and are issued from the Amazon N2 CA operated by Amazon Trust Services.

This article describes the results of issuing an SFG2 hierarchy N2 certificate, exporting it, and trying mTLS.

Test Environment

  • Region: Tokyo (ap-northeast-1)
  • Default AWS CLI region: ap-northeast-1
  • Root hierarchy: N2_SFG2_AMAZON_MANAGED (CLIENT_AND_SERVER_AUTH)
  • Key: EC_prime256v1
  • DNS: Route 53 public hosted zone
  • Domain name: n2-demo.example.com (for illustration; replace it with your own domain name)
  • AWS CLI: 2.42.2
  • OpenSSL: 3.5.9 (alpine/openssl container)

Issuing the Certificate

This time, I issued an N2_SFG2_AMAZON_MANAGED certificate.

Issuance Request

You choose the root hierarchy for an N2 certificate from N2_AMAZON_MANAGED and N2_SFG2_AMAZON_MANAGED. The differences are as follows.

Item N2_AMAZON_MANAGED N2_SFG2_AMAZON_MANAGED
Maximum validity period 395 days 98 days
Price (per FQDN; charged at issuance and renewal) $30.00 $7.50
Price (per wildcard; charged at issuance and renewal) $150.00 $35.00
Usage (CertificateUsage) CLIENT_AND_SERVER_AUTH or CLIENT_AUTH_ONLY CLIENT_AND_SERVER_AUTH only
Trust store on the verifying side Requires adding the Amazon N2 root Requires adding Starfield Services Root Certificate Authority - G2 (hereafter, the SFG2 root)

https://docs.aws.amazon.com/acm/latest/userguide/acm-amazon-n2-certificates.html

https://aws.amazon.com/certificate-manager/pricing/

The issuance command is as follows.

aws acm request-certificate \
  --domain-name n2-demo.example.com \
  --validation-method DNS \
  --key-algorithm EC_prime256v1 \
  --root-hierarchy-type N2_SFG2_AMAZON_MANAGED \
  --certificate-usage CLIENT_AND_SERVER_AUTH

The command returns the certificate's ARN. Specify this ARN for <証明書のARN> in the following commands.

DNS Validation

When I ran describe-certificate right after the request, the Status was PENDING_VALIDATION. The ResourceRecord in DomainValidationOptions contained the Name, Type, and Value of the validation CNAME.

aws acm describe-certificate --certificate-arn <証明書のARN>

Save the change-batch that registers this CNAME in Route 53 as route53-validation-cname-upsert.json.

{
  "Changes": [
    {
      "Action": "UPSERT",
      "ResourceRecordSet": {
        "Name": "<ResourceRecord の Name>",
        "Type": "CNAME",
        "TTL": 300,
        "ResourceRecords": [
          { "Value": "<ResourceRecord の Value>" }
        ]
      }
    }
  ]
}

I registered it in Route 53 and waited with aws acm wait certificate-validated until the status became ISSUED.

aws route53 change-resource-record-sets --hosted-zone-id <ホストゾーンID> --change-batch file://route53-validation-cname-upsert.json
aws acm wait certificate-validated --certificate-arn <証明書のARN>

State After Issuance

Checking the ISSUED certificate with describe-certificate returned the following (excerpt).

{
    "Certificate": {
        "DomainName": "n2-demo.example.com",
        "CreatedAt": "2026-11-25T20:48:34.567000+09:00",
        "IssuedAt": "2026-11-25T20:49:29.329000+09:00",
        "Status": "ISSUED",
        "NotBefore": "2026-11-25T19:49:11+09:00",
        "NotAfter": "2027-03-03T20:49:11+09:00",
        "KeyAlgorithm": "EC-prime256v1",
        "Type": "AMAZON_ISSUED",
        "ExtendedKeyUsages": [
            {
                "Name": "TLS_WEB_SERVER_AUTHENTICATION",
                "OID": "1.3.6.1.5.5.7.3.1"
            },
            {
                "Name": "TLS_WEB_CLIENT_AUTHENTICATION",
                "OID": "1.3.6.1.5.5.7.3.2"
            }
        ],
        "Options": {
            "CertificateTransparencyLoggingPreference": "DISABLED",
            "Export": "ENABLED"
        },
        "CertificateUsage": "CLIENT_AND_SERVER_AUTH",
        "RootHierarchyType": "N2_SFG2_AMAZON_MANAGED"
    }
}

I did not specify Export in the request, but Export in Options was ENABLED, and the certificate could be exported as is.

The Exported Certificate

Export

The private key is returned encrypted with the passphrase passed to export-certificate. Write a passphrase (20 alphanumeric characters with no newline) to a file and pass it. Extract the certificate, chain, and encrypted private key from the response, and finally decrypt the private key into key.pem.

head -c 30 /dev/urandom | base64 | tr -d '\n=+/' | head -c 20 > passphrase.txt
aws acm export-certificate --certificate-arn <証明書のARN> --passphrase fileb://passphrase.txt > export.json
jq -r .Certificate export.json > cert.pem
jq -r .CertificateChain export.json > chain.pem
jq -r .PrivateKey export.json > key.enc.pem
docker run --rm -v "$PWD:/w" -w /w alpine/openssl pkey -in key.enc.pem -passin file:passphrase.txt -out key.pem

Certificate Contents

I displayed the contents of cert.pem with openssl x509 and excerpt the main items.

docker run --rm -v "$PWD:/w" -w /w alpine/openssl x509 -in cert.pem -noout -text
        Issuer: C=US, O=Amazon, CN=Amazon SFG2 N2 ECDSA 256 M013
        Validity
            Not Before: Nov 25 10:49:11 2026 GMT
            Not After : Mar  3 11:49:11 2027 GMT
        Subject: CN=n2-demo.example.com
            X509v3 Subject Alternative Name: 
                DNS:n2-demo.example.com
            X509v3 Key Usage: critical
                Digital Signature
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 CRL Distribution Points: 
                Full Name:
                  URI:http://crl.r4002.amazontrust.com/n2xie2m013/9X1Ko7uuLEP.crl
            X509v3 Certificate Policies: 
                Policy: 2.23.140.1.2.1
            Authority Information Access: 
                OCSP - URI:http://ocsp.r4002.amazontrust.com
                CA Issuers - URI:http://crt.r4002.amazontrust.com/n2xie2m013.cer
            X509v3 Basic Constraints: critical
                CA:FALSE

The output did not include the SCT (Signed Certificate Timestamp) extension (CT Precertificate SCTs), which indicates registration in CT logs.

Chain and Verification

The CertificateChain contains two certificates and does not include the SFG2 root itself.

Position Subject CN Issuer CN
Leaf (cert.pem) n2-demo.example.com Amazon SFG2 N2 ECDSA 256 M013
Chain 1st Amazon SFG2 N2 ECDSA 256 M013 Amazon SFG2 N2 ECDSA 256 Root M1
Chain 2nd Amazon SFG2 N2 ECDSA 256 Root M1 Starfield Services Root Certificate Authority - G2

The PEM of the SFG2 root (SFSRootCAG2.pem) is distributed in the Amazon Trust Services repository. Put the SFG2 root in the trust store on the verifying side.

https://www.amazontrust.com/repository/

I trusted only the SFG2 root, passed chain.pem to -untrusted, and verified inside the container.

$ openssl verify -no-CApath -no-CAstore -CAfile SFSRootCAG2.pem -untrusted chain.pem cert.pem
cert.pem: OK
$ openssl verify -no-CApath -no-CAstore -purpose sslclient -CAfile SFSRootCAG2.pem -untrusted chain.pem cert.pem
cert.pem: OK
$ openssl verify -no-CApath -no-CAstore -purpose sslserver -CAfile SFSRootCAG2.pem -untrusted chain.pem cert.pem
cert.pem: OK

The normal verification, the client-purpose verification, and the server-purpose verification all succeeded.

mTLS Connectivity

I ran openssl's s_server and s_client in a single container and tried mTLS in which both sides present the same N2 certificate.

Setup

Place cert.pem, chain.pem, and key.pem created by the export in the working directory. Also place the SFG2 root PEM file (SFSRootCAG2.pem). Save the following script as mtls-test.sh.

#!/bin/sh
cd /w
HOST=n2-demo.example.com

run_case() {
  name="$1"; port="$2"; server_ca="$3"; client_ca="$4"
  echo "=== case: $name (server -CAfile $server_ca / client -CAfile $client_ca)"
  openssl s_server -accept "$port" -cert cert.pem -key key.pem -cert_chain chain.pem \
    -CAfile "$server_ca" -no-CApath -no-CAstore -Verify 2 -verify_return_error -www -naccept 1 >/tmp/server-$port.log 2>&1 &
  SP=$!
  sleep 1
  printf 'GET / HTTP/1.0\r\n\r\n' | timeout 15 openssl s_client -connect 127.0.0.1:"$port" -servername "$HOST" \
    -verify_hostname "$HOST" -verify_return_error -CAfile "$client_ca" -no-CApath -no-CAstore \
    -cert cert.pem -key key.pem -cert_chain chain.pem -tls1_3 -brief >/tmp/client-$port.log 2>&1
  echo "client exit=$?"
  head -n 12 /tmp/client-$port.log
  sleep 1
  kill "$SP" 2>/dev/null
  echo "--- server log"
  grep -E 'ACCEPT|ERROR|error|alert|verify|FIN|Client certificate|Verification' /tmp/server-$port.log | head -n 10
  echo
}

run_case "both-trust-SFG2" 4431 SFSRootCAG2.pem SFSRootCAG2.pem

The server requires a client certificate with -Verify 2. The client specifies the certificate's domain name with -verify_hostname and connects with -tls1_3. Both add -no-CApath -no-CAstore so that verification uses only the file given by -CAfile.

Run the script in a container with the working directory mounted at /w.

docker run --rm -v "$PWD:/w" -v "$PWD/mtls-test.sh:/mtls-test.sh:ro" --entrypoint sh alpine/openssl /mtls-test.sh

Results

When I ran the script, the connection was established. The main lines of the client output are as follows.

client exit=0
Connecting to 127.0.0.1
CONNECTION ESTABLISHED
Protocol version: TLSv1.3
Ciphersuite: TLS_AES_256_GCM_SHA384
Peer certificate: CN=n2-demo.example.com
Hash used: SHA256
Signature type: ecdsa_secp256r1_sha256
Verification: OK
Verified peername: n2-demo.example.com
Negotiated TLS1.3 group: X25519MLKEM768
DONE

When the SFG2 Root Is Not Trusted

If you pass Amazon Root CA 1 instead of the SFG2 root to the -CAfile of either the server or the client, that side is configured not to trust the SFG2 root. The PEM of Amazon Root CA 1 (AmazonRootCA1.pem) is distributed in the Amazon Trust Services repository.

I placed AmazonRootCA1.pem in the working directory, added the following two lines to the end of the script, and ran it.

run_case "server-does-not-trust-SFG2" 4432 AmazonRootCA1.pem SFSRootCAG2.pem
run_case "client-does-not-trust-SFG2" 4433 SFSRootCAG2.pem AmazonRootCA1.pem

The results are as follows.

Configuration Where the error appears Error details
The server does not trust the SFG2 root Server log verify error:num=20:unable to get local issuer certificate. Followed by tls_process_client_certificate:certificate verify failed
The client does not trust the SFG2 root Client output verify error:num=20:unable to get local issuer certificate at Amazon SFG2 N2 ECDSA 256 Root M1 at depth=2. Followed by tls_post_process_server_certificate:certificate verify failed. The server log shows tlsv1 alert unknown ca (alert number 48)

In both cases, these are the errors that occur when the verifying side's trust store does not have the SFG2 root and cannot find the upper issuer in the chain.

Listing and Searching

You get the list of N2 certificates with list-certificates. To include certificates whose key is EC_prime256v1, specify --includes keyTypes=EC_prime256v1.

aws acm list-certificates \
  --root-hierarchy-types N2_AMAZON_MANAGED N2_SFG2_AMAZON_MANAGED \
  --includes keyTypes=EC_prime256v1 \
  --query 'CertificateSummaryList[].[DomainName,Status,RootHierarchyType,KeyAlgorithm,Type]'
[
    [
        "n2-demo.example.com",
        "ISSUED",
        "N2_SFG2_AMAZON_MANAGED",
        "EC-prime256v1",
        "AMAZON_ISSUED"
    ]
]

With search-certificates, simply specifying a RootHierarchyType filter returned the same certificate. The response includes RootHierarchyType, CertificateUsage, and Exported.

aws acm search-certificates \
  --filter-statement '{"Filter": {"AcmCertificateMetadataFilter": {"RootHierarchyType": "N2_SFG2_AMAZON_MANAGED"}}}'

Summary

I was able to issue an SFG2 hierarchy Amazon N2 certificate in AWS Certificate Manager (ACM) and confirm mTLS connectivity.

The exportable public certificates, which became available in June 2025, did not include the clientAuth extended key usage and could not be used for client authentication.

https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html

https://aws.amazon.com/jp/blogs/news/aws-certificate-manager-introduces-exportable-public-ssl-tls-certificates-to-use-anywhere/

https://dev.classmethod.jp/articles/amazon-certificate-manager-export-certificate-file/

Now that ACM supports Amazon N2 certificates, you can use ACM certificates for client authentication as well.

However, the trust store on the verifying side needs the root that corresponds to the certificate you use (Amazon N2 / SFG2). Please also keep the cost and validity period in mind when using it.

Share this article

AWSのお困り事はクラスメソッドへ

Related articles