Home icon

Implementing HTTP Strict Transport Security (HSTS) across AWS services

Security Blog



This article provides a comprehensive guide to implementing HTTP Strict Transport Security (HSTS) across AWS services to protect against protocol downgrade attacks and cookie hijacking.

  • HSTS enforces browser-level HTTPS-only connections, preventing SSL stripping attacks
  • API Gateway: Configure via response parameter mapping (HTTP APIs) or mapping templates/method responses (REST APIs)
  • Application Load Balancers: Use built-in response header modification feature for centralized HSTS enforcement
  • CloudFront: Deploy HSTS via response headers policies with managed or custom configurations
  • Start with shorter max-age values (300 seconds) and gradually increase to production levels (31,536,000 seconds)
  • Include includeSubDomains directive for comprehensive subdomain protection
  • Consider HSTS preloading for maximum security but understand irreversibility and long-term commitment

This unified approach enables consistent security policies across distributed AWS architectures while aligning with Well-Architected Framework principles.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Dec 11
2024
Demystifying AWS Data Transfer services to build secure and reliable applications
Sep 25
2025
AWS Network Firewall enhances application layer traffic controls
Jan 30
2024
Secure Amazon Elastic Container Service workloads with Amazon ECS Service Connect
Feb 7
2025
Enhancing telecom security with AWS

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.