This article applies to all supported API Gateway versions.
This article will explain how to add an HSTS header to API Gateway responses.
HTTP Strict Transport Security (HSTS) is a web security policy mechanism that helps to protect websites against protocol downgrade attacks and cookie hijacking. It allows web servers to declare that web browsers (or other complying user agents) should only interact with it using secure HTTPS connections and never via the insecure HTTP protocol.
This article applies to all supported API Gateway versions.
HSTS support on the API Gateway can be achieved by the use of the Manage Transport Properties/Headers assertion to your policy.
If you would like this to apply to all Gateway services the assertion can be added to a Global policy such as the message completed policy. More details about global policies can be found here: