Lesson 5 of 5 Encryption in Transit and Certificates

Authenticating Clients with Mutual TLS

This lesson explains mutual TLS, which also authenticates the client with a certificate, for business-to-business APIs, devices and service-to-service traffic where passwords and API keys are not strong enough.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify where mutual TLS is supported, including ALB verify and passthrough modes.
  • Explain how client certificates are issued and revoked at scale.

Where mutual TLS is supported

In mutual TLS (mTLS), the client also presents a certificate, so both sides prove their identity. An ALB supports two modes. In verify mode, the load balancer checks client certificates against a trust store, a CA bundle with optional revocation lists held in S3, and rejects clients that fail. In passthrough mode, it forwards the certificate in HTTP headers for the application to verify. API Gateway supports mTLS on custom domains, with a trust store in S3. AWS IoT Core authenticates every device connection with its device certificate. VPC Lattice and service meshes provide TLS between services, with identity checks. The following table summarises the implementations.

ServiceImplementation
ALBVerify mode checks client certificates against a trust store (CA bundle and optional revocation lists in S3); passthrough mode forwards the certificate in headers for the application to verify
API GatewayMutual TLS on custom domains with a trust store in S3
AWS IoT CoreDevice certificates authenticate every connection
VPC Lattice and service meshesTLS between services, with identity checks
Sort into groups

ALB verify or passthrough mode?

Exam skills 5.1.1

Decide which ALB mutual TLS mode fits each requirement.

Log in to try this activity Interactive activities are free with an account.

Issuing and revoking client certificates

With mutual TLS, every client holds a certificate and private key, so the organisation must manage potentially thousands of client certificates through their whole lifecycle: issuing them to the right clients, renewing them before they expire, and revoking them when a client is decommissioned or a key is compromised. Revocation is particularly important, because a stolen client certificate otherwise remains valid until it expires. The following list describes the practices.

  • Issue client certificates from AWS Private CA, shared across accounts with RAM.
  • Use short-lived certificates, which expire before revocation matters, where clients can renew automatically.
  • Publish certificate revocation lists to the ALB trust store; for API Gateway, which does not check revocation itself, check revoked serial numbers in a Lambda authorizer.
  • Map certificate attributes, such as the subject, to client identities in the application.

The following diagram follows a partner request through the checks.

Certificate authentication for partners, with immediate cut-off. Each partner presents a client certificate from AWS Private CA to a custom domain with mutual TLS; API Gateway does not check revocation lists, so a Lambda authoriser compares the serial number with the revoked list. The default endpoint is disabled.
mTLS stands for mutual TLS.
Select all that apply

Managing client certificates

Exam skills 5.1.1 · 5.3.5

Pick the practices for issuing and revoking mutual TLS client certificates.

Log in to try this activity Interactive activities are free with an account.
Worked example

A bank's partner API on API Gateway is protected only by API keys. Regulators require that each partner authenticates with a certificate, and that a compromised partner can be cut off immediately.

Enable mutual TLS on the API's custom domain with a trust store containing the bank's private CA, issue each partner a client certificate from AWS Private CA, and disable the default execute-api endpoint so mutual TLS cannot be bypassed. Because API Gateway does not check revocation lists, a Lambda authorizer compares the client certificate's serial number with the list of revoked certificates, so revoking one partner's certificate cuts that partner off without affecting others.

Check yourself

Why disable API Gateway's default endpoint when using mutual TLS?

Show answer

Otherwise clients could call the default endpoint and bypass the custom domain's certificate check.

Exam Tips

Remember for the exam

  • ALB mTLS verify mode uses a trust store; passthrough mode forwards the certificate to targets.
  • API Gateway supports mutual TLS on custom domains with a trust store in S3.
  • Disable API Gateway's default endpoint so mutual TLS cannot be bypassed.
  • Issue client certificates from AWS Private CA.
  • ALB trust stores check revocation lists; API Gateway needs a Lambda authorizer for revocation.