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 5
2025
Amazon SES adds VPC support for API endpoints
Dec 11
2025
AWS Application Migration Service supports IPv6
Nov 21
2025
AWS Security Token Service Now Supports Internet Protocol version 6 (IPv6)
Nov 21
2025
Practical steps to minimize key exposure using AWS Security Services

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.