This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Lightsail::Distribution CacheSettings
CacheSettings is a property of the AWS::Lightsail::Distribution resource. It describes the cache settings of an
Amazon Lightsail content delivery network (CDN) distribution.
These settings apply only to your distribution’s CacheBehaviors that have a Behavior of
cache. This includes the DefaultCacheBehavior.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "AllowedHTTPMethods" :String, "CachedHTTPMethods" :String, "DefaultTTL" :Integer, "ForwardedCookies" :CookieObject, "ForwardedHeaders" :HeaderObject, "ForwardedQueryStrings" :QueryStringObject, "MaximumTTL" :Integer, "MinimumTTL" :Integer}
YAML
AllowedHTTPMethods:StringCachedHTTPMethods:StringDefaultTTL:IntegerForwardedCookies:CookieObjectForwardedHeaders:HeaderObjectForwardedQueryStrings:QueryStringObjectMaximumTTL:IntegerMinimumTTL:Integer
Properties
AllowedHTTPMethods-
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
-
GET,HEAD- The distribution forwards theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution forwards theGET,HEAD, andOPTIONSmethods. -
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE- The distribution forwards theGET,HEAD,OPTIONS,PUT,PATCH,POST, andDELETEmethods.
If you specify
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE, you might need to restrict access to your distribution's origin so users can't perform operations that you don't want them to. For example, you might not want users to have permission to delete objects from your origin.Required: No
Type: String
Pattern:
.*\S.*Update requires: No interruption
-
CachedHTTPMethods-
The HTTP method responses that are cached by your distribution.
You can specify the following options:
-
GET,HEAD- The distribution caches responses to theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution caches responses to theGET,HEAD, andOPTIONSmethods.
Required: No
Type: String
Pattern:
.*\S.*Update requires: No interruption
-
DefaultTTL-
The default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
Note
The value specified applies only when the origin does not add HTTP headers such as
Cache-Control max-age,Cache-Control s-maxage, andExpiresto objects.Required: No
Type: Integer
Update requires: No interruption
-
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
Required: No
Type: CookieObject
Update requires: No interruption
ForwardedHeaders-
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
Required: No
Type: HeaderObject
Update requires: No interruption
ForwardedQueryStrings-
An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded.
Required: No
Type: QueryStringObject
Update requires: No interruption
MaximumTTL-
The maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
The value specified applies only when the origin adds HTTP headers such as
Cache-Control max-age,Cache-Control s-maxage, andExpiresto objects.Required: No
Type: Integer
Update requires: No interruption
MinimumTTL-
The minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
A value of
0must be specified forminimumTTLif the distribution is configured to forward all headers to the origin.Required: No
Type: Integer
Update requires: No interruption