AWS has done a lot of the post-quantum work for you. S3, IAM, KMS, Secrets Manager, ACM and many other service endpoints already accept hybrid ML-KEM key exchange, and CloudFront offers it to every visitor by default. What AWS leaves to you are the resources you configure yourself, mainly load balancers and API Gateway, and the SDKs your code uses to call AWS.
This tutorial walks through those changes in order, with commands you can copy. It is part of our post-quantum cloud migration guide, which also covers Google Cloud and Azure. If you want the "why" first, start with our founder's plan.
Time needed: about a day for a small stack, plus a deploy cycle for SDK upgrades.
You need: AWS CLI v2, permission to modify load balancers and API Gateway, and OpenSSL 3.5 or later on your laptop for testing.

The seven steps in this tutorial. Illustration by SAMO Technologies.
What AWS already does, and what it leaves to you
| Service | Post-quantum status | Your action |
|---|---|---|
| ALB and NLB | PQ security policies available | Switch each listener (Step 2) |
| API Gateway (REST) | PQ policies for regional and private endpoints | Switch policy and redeploy (Step 3) |
| CloudFront | On by default for viewers; origin side coming soon | None (Step 4) |
| S3, IAM, STS, KMS, ACM, Secrets Manager, Private CA | Endpoints accept hybrid ML-KEM | Upgrade SDKs (Step 5) |
| AWS KMS keys | ML-DSA and ML-KEM keys available | Use for new signing (Step 7) |
| Amplify Hosting | Served through CloudFront; not listed separately | Test your domain; upgrade SDKs in server code |
Sources: AWS post-quantum readiness page and migration guide.
Step 1: Inventory your TLS listeners and keys
Start by finding every ALB and NLB listener that does not use a post-quantum policy. This loop prints the listener, protocol and current policy, and hides the ones that already end in -PQ-:
for lb in $(aws elbv2 describe-load-balancers \
--query 'LoadBalancers[?Type!=`gateway`].LoadBalancerArn' --output text); do
aws elbv2 describe-listeners --load-balancer-arn "$lb" \
--query 'Listeners[?SslPolicy].[ListenerArn,Protocol,SslPolicy]' --output text
done | grep -v -- '-PQ-'
Run it in every region you use. Then list your REST APIs and their policies:
aws apigateway get-rest-apis \
--query 'items[].[id,name,endpointConfiguration.types[0],securityPolicy]' \
--output table
aws apigateway get-domain-names \
--query 'items[].[domainName,endpointConfiguration.types[0],securityPolicy]' \
--output table
Finally, list asymmetric keys in KMS so you know which RSA and ECC signing keys exist:
aws kms list-keys --query 'Keys[].KeyId' --output text | tr '\t' '\n' |
while read k; do
aws kms describe-key --key-id "$k" \
--query 'KeyMetadata.[KeyId,KeySpec,KeyUsage,Description]' --output text
done | grep -v SYMMETRIC_DEFAULT
Step 2: Switch ALB and NLB listeners to a PQ policy
AWS added hybrid ML-KEM to Application and Network Load Balancers in a set of new security policies. AWS recommends ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09, or ELBSecurityPolicy-TLS13-1-2-Res-FIPS-PQ-2025-09 if you need FIPS, according to the ALB security policy docs. These policies offer X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024, keep classical groups for older clients, and accept TLS 1.2 and 1.3.
Change one listener:
aws elbv2 modify-listener \
--listener-arn "$LISTENER_ARN" \
--ssl-policy ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09
Then pin it in infrastructure as code, so the next deploy does not undo it. In Terraform:
resource "aws_lb_listener" "https" {
load_balancer_arn = aws_lb.main.arn
port = 443
protocol = "HTTPS"
certificate_arn = aws_acm_certificate.main.arn
ssl_policy = "ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09"
# default_action ...
}
In CloudFormation, set SslPolicy: ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09 on the AWS::ElasticLoadBalancingV2::Listener. In CDK, set the listener's sslPolicy to the same policy name.
A few details to know:
- Hybrid key exchange needs TLS 1.3. Clients on TLS 1.2 still connect, using a classical group.
- Older clients. If you must support TLS 1.0 or unusual ciphers, AWS has
Ext1,Ext2andTLS13-1-0PQ variants. Check the policy table before you pick one. - ALB has no custom policies, so pick from the list.
Step 3: Switch API Gateway REST APIs
API Gateway REST APIs gained enhanced security policies, and three of them include post-quantum key exchange: SecurityPolicy_TLS13_1_2_PQ_2025_09, SecurityPolicy_TLS13_1_2_PFS_PQ_2025_09 and SecurityPolicy_TLS13_1_2_FIPS_PFS_PQ_2025_09. According to the supported policies list, they work only for regional and private endpoints and custom domains, not edge-optimized ones.
Enhanced policies also need an endpoint access mode. Start with BASIC, check your logs, and move to STRICT later, as AWS recommends:
aws apigateway update-rest-api --rest-api-id abcd1234 \
--patch-operations '[
{"op":"replace","path":"/securityPolicy","value":"SecurityPolicy_TLS13_1_2_PQ_2025_09"},
{"op":"replace","path":"/endpointAccessMode","value":"BASIC"}
]'
aws apigateway create-deployment --rest-api-id abcd1234 --stage-name prod
If you use a custom domain, set the same policy on it, because the custom domain's policy is the one used for the TLS handshake:
aws apigateway update-domain-name --domain-name api.example.com \
--patch-operations op=replace,path=/securityPolicy,value=SecurityPolicy_TLS13_1_2_PQ_2025_09
The change takes about 15 minutes, and the API stays available while it runs (AWS docs).
Step 4: Leave CloudFront's viewer side alone
CloudFront added hybrid post-quantum key exchange to all of its TLS security policies by default, with no configuration. You don't need to switch policies. The optional TLS1.3_2025 policy only removes TLS 1.2 support, which most consumer sites should not do yet.
The gap is the CloudFront-to-origin connection, which AWS lists as "coming soon". Until then, that hop between AWS's edge and your origin uses classical key exchange. Track it, and keep your origin's own listener on a PQ policy so it is ready.
Amplify Hosting serves sites through CloudFront, but AWS does not list it separately. Run the test in Step 6 against your Amplify domain to confirm.
Step 5: Upgrade SDKs, runtimes and container images
Your calls to S3, KMS, Secrets Manager and other AWS APIs only use hybrid ML-KEM if your client offers it. AWS keeps a per-language list. The short version:
| Language or tool | What you need |
|---|---|
| Node.js | Node.js 22.20 (LTS) or 24.9.0 and later, which bundle OpenSSL 3.5. On by default. |
| Go | Go 1.24 or later. On by default. |
| Java | AWS SDK for Java 2.35.11+ with AwsCrtHttpClient, or JDK 27+ with the default client. |
| Python (Boto3) | Python 3.14.6+ from the python.org installers on Windows and macOS. On Linux, OpenSSL 3.5+ and a crypto policy that allows PQ groups. |
| Rust | Service crates published after August 29, 2025. |
| Kotlin | 1.5.78+ on Linux. |
| .NET | .NET 10 on Windows 11; OpenSSL 3.5+ on Linux. |
| PHP, Ruby, C++ | System OpenSSL 3.5+ (C++ can also opt in through the CRT client). |
| AWS CLI | v2.34.54+ on Linux. On macOS, install through Homebrew with OpenSSL 3.6. |
On Amazon Linux 2023, Python also needs the system crypto policy to include post-quantum groups:
sudo update-crypto-policies --set DEFAULT:PQ
For Lambda and containers, don't guess which TLS library you have. Log it once from inside the function or container:
# Node.js
node -e "console.log(process.versions.openssl)"
# Python
python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"
You want 3.5 or later. If a managed Lambda runtime is older, a container-image Lambda with a newer base image is the fastest fix.
Step 6: Prove it is negotiated
Enabled is not the same as used. Check three places.
From your laptop, with OpenSSL 3.5 or later. This only succeeds if the server accepts hybrid ML-KEM:
openssl s_client -connect app.example.com:443 -servername app.example.com \
-tls1_3 -groups X25519MLKEM768 -brief </dev/null
Look for Negotiated TLS1.3 group: X25519MLKEM768.
In ALB connection logs. Turn on connection logs for the load balancer and look at the tls_keyexchange field, which shows what each client negotiated (AWS docs). This also tells you what share of your real users is already on hybrid ML-KEM.
In CloudTrail, for your own calls to KMS and other services. Each event's tlsDetails includes the key exchange, according to AWS:
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=EventSource,AttributeValue=kms.amazonaws.com \
--max-results 20 --query 'Events[].CloudTrailEvent' --output json \
| jq -r '.[] | fromjson | [.eventName, .userAgent, .tlsDetails.keyExchange] | @tsv'
Any service whose calls still show a classical group needs its SDK or runtime upgraded.
Step 7: Start new signing workloads on ML-DSA
Signatures are the "future forgery" risk, so this step is less urgent. But if you are creating a new signing key today, for firmware, documents or audit logs that must stay trustworthy for years, make it post-quantum. AWS KMS supports ML_DSA_44, ML_DSA_65 and ML_DSA_87 keys (AWS docs). Following AWS's walkthrough:
aws kms create-key --key-spec ML_DSA_65 --key-usage SIGN_VERIFY \
--description "ML-DSA signing key for release artifacts"
aws kms sign --key-id <key-id> --message fileb://manifest.json \
--message-type RAW --signing-algorithm ML_DSA_SHAKE_256 \
--query Signature --output text | base64 -d > manifest.sig
aws kms verify --key-id <key-id> --message fileb://manifest.json \
--message-type RAW --signing-algorithm ML_DSA_SHAKE_256 \
--signature fileb://manifest.sig
RAW works for messages up to 4 KB. For larger files, compute the 64-byte ML-DSA message representative ("mu") yourself and sign it with --message-type EXTERNAL_MU. KMS also offers ML-KEM keys for key encapsulation, outside the China Regions.
If you run your own private PKI, AWS Private CA supports post-quantum ML-DSA certificates, and IAM Roles Anywhere accepts them. Keep your public ACM certificates on RSA or ECDSA for now. Browsers are not ready for post-quantum public certificates.
Common mistakes
- Fixing the CDN and stopping. Each hop is a separate handshake. See the diagram in our cross-cloud guide.
- Creating listeners from code without
SslPolicy. They get the 2016 default. - Upgrading the SDK but not the base image. Many SDKs use the system OpenSSL.
- Rewriting crypto in application code. Use KMS and maintained libraries, and keep hybrid mode on.
Frequently asked questions
How do I enable post-quantum TLS on an AWS Application Load Balancer?
Run aws elbv2 modify-listener with --ssl-policy ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09, and set the same value in your infrastructure code.
Does CloudFront support post-quantum TLS?
Yes, for viewers, by default. The CloudFront-to-origin connection is still listed as coming soon.
Which AWS SDK versions support post-quantum TLS?
It depends on the language. In general, anything on OpenSSL 3.5 or later, Go 1.24 or later, or Node.js 22.20 or later works. See the table in Step 5.
Can AWS KMS create post-quantum signing keys?
Yes. Use the ML_DSA_44, ML_DSA_65 or ML_DSA_87 key specs with the ML_DSA_SHAKE_256 signing algorithm.
Where SAMO fits
If you went to re:Invent this week, you saw how fast AWS ships. Keeping up is the hard part. SAMO Technologies helps startups run this kind of migration without pulling the core team off the roadmap: a fractional CTO to scope and prioritize, and nearshore engineers in your time zone to update the Terraform, upgrade images, and add the checks to CI.
Want a second pair of eyes on your AWS post-quantum plan? Talk with SAMO Technologies.
