

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Lightsail::Distribution
<a name="aws-resource-lightsail-distribution"></a>

The `AWS::Lightsail::Distribution` resource specifies a content delivery network (CDN) distribution. You can create distributions only in the `us-east-1`AWS Region.

A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.

## Syntax
<a name="aws-resource-lightsail-distribution-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-lightsail-distribution-syntax.json"></a>

```
{
  "Type" : "AWS::Lightsail::Distribution",
  "Properties" : {
      "[BundleId](#cfn-lightsail-distribution-bundleid)" : String,
      "[CacheBehaviors](#cfn-lightsail-distribution-cachebehaviors)" : [ CacheBehaviorPerPath, ... ],
      "[CacheBehaviorSettings](#cfn-lightsail-distribution-cachebehaviorsettings)" : CacheSettings,
      "[CertificateName](#cfn-lightsail-distribution-certificatename)" : String,
      "[DefaultCacheBehavior](#cfn-lightsail-distribution-defaultcachebehavior)" : CacheBehavior,
      "[DistributionName](#cfn-lightsail-distribution-distributionname)" : String,
      "[IpAddressType](#cfn-lightsail-distribution-ipaddresstype)" : String,
      "[IsEnabled](#cfn-lightsail-distribution-isenabled)" : Boolean,
      "[Origin](#cfn-lightsail-distribution-origin)" : InputOrigin,
      "[Tags](#cfn-lightsail-distribution-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-lightsail-distribution-syntax.yaml"></a>

```
Type: AWS::Lightsail::Distribution
Properties:
  [BundleId](#cfn-lightsail-distribution-bundleid): String
  [CacheBehaviors](#cfn-lightsail-distribution-cachebehaviors): 
    - CacheBehaviorPerPath
  [CacheBehaviorSettings](#cfn-lightsail-distribution-cachebehaviorsettings): 
    CacheSettings
  [CertificateName](#cfn-lightsail-distribution-certificatename): String
  [DefaultCacheBehavior](#cfn-lightsail-distribution-defaultcachebehavior): 
    CacheBehavior
  [DistributionName](#cfn-lightsail-distribution-distributionname): String
  [IpAddressType](#cfn-lightsail-distribution-ipaddresstype): String
  [IsEnabled](#cfn-lightsail-distribution-isenabled): Boolean
  [Origin](#cfn-lightsail-distribution-origin): 
    InputOrigin
  [Tags](#cfn-lightsail-distribution-tags): 
    - Tag
```

## Properties
<a name="aws-resource-lightsail-distribution-properties"></a>

`BundleId`  <a name="cfn-lightsail-distribution-bundleid"></a>
The ID of the bundle applied to the distribution.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheBehaviors`  <a name="cfn-lightsail-distribution-cachebehaviors"></a>
An array of objects that describe the per-path cache behavior of the distribution.  
*Required*: No  
*Type*: Array of [CacheBehaviorPerPath](aws-properties-lightsail-distribution-cachebehaviorperpath.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CacheBehaviorSettings`  <a name="cfn-lightsail-distribution-cachebehaviorsettings"></a>
An object that describes the cache behavior settings of the distribution.  
*Required*: No  
*Type*: [CacheSettings](aws-properties-lightsail-distribution-cachesettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CertificateName`  <a name="cfn-lightsail-distribution-certificatename"></a>
The name of the SSL/TLS certificate attached to the distribution.  
*Required*: No  
*Type*: String  
*Pattern*: `\w[\w\-]*\w`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefaultCacheBehavior`  <a name="cfn-lightsail-distribution-defaultcachebehavior"></a>
An object that describes the default cache behavior of the distribution.  
*Required*: Yes  
*Type*: [CacheBehavior](aws-properties-lightsail-distribution-cachebehavior.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DistributionName`  <a name="cfn-lightsail-distribution-distributionname"></a>
The name of the distribution  
*Required*: Yes  
*Type*: String  
*Pattern*: `\w[\w\-]*\w`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IpAddressType`  <a name="cfn-lightsail-distribution-ipaddresstype"></a>
The IP address type of the distribution.  
The possible values are `ipv4` for IPv4 only, and `dualstack` for IPv4 and IPv6.  
*Required*: No  
*Type*: String  
*Allowed values*: `dualstack | ipv4 | ipv6`  
*Update requires*: Updates are not supported.

`IsEnabled`  <a name="cfn-lightsail-distribution-isenabled"></a>
A Boolean value indicating whether the distribution is enabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Origin`  <a name="cfn-lightsail-distribution-origin"></a>
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.  
The distribution pulls, caches, and serves content from the origin.  
*Required*: Yes  
*Type*: [InputOrigin](aws-properties-lightsail-distribution-inputorigin.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-lightsail-distribution-tags"></a>
An array of key-value pairs to apply to this resource.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide*.  
The `Value` of `Tags` is optional for Lightsail resources.
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-distribution-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lightsail-distribution-return-values"></a>

### Ref
<a name="aws-resource-lightsail-distribution-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a unique identifier for this resource.

### Fn::GetAtt
<a name="aws-resource-lightsail-distribution-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lightsail-distribution-return-values-fn--getatt-fn--getatt"></a>

`AbleToUpdateBundle`  <a name="AbleToUpdateBundle-fn::getatt"></a>
Indicates whether you can update the distribution’s current bundle to another bundle.

`DistributionArn`  <a name="DistributionArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the distribution.

`Status`  <a name="Status-fn::getatt"></a>
The status of the distribution.

## Remarks
<a name="aws-resource-lightsail-distribution--remarks"></a>

 *Configuring cache behavior settings* 

The `CacheBehaviorSettings` parameter can be set only if the `DefaultCacheBehavior` parameter is set to `cache`, or if the `CacheBehaviors` parameter has a path with a `cache` behavior. If neither of those conditions are true, the `CacheBehaviorSettings` will not be set for the distribution and the stack will drift.

# AWS::Lightsail::Distribution CacheBehavior
<a name="aws-properties-lightsail-distribution-cachebehavior"></a>

`CacheBehavior` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource. It describes the default cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.

## Syntax
<a name="aws-properties-lightsail-distribution-cachebehavior-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-cachebehavior-syntax.json"></a>

```
{
  "[Behavior](#cfn-lightsail-distribution-cachebehavior-behavior)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-cachebehavior-syntax.yaml"></a>

```
  [Behavior](#cfn-lightsail-distribution-cachebehavior-behavior): String
```

## Properties
<a name="aws-properties-lightsail-distribution-cachebehavior-properties"></a>

`Behavior`  <a name="cfn-lightsail-distribution-cachebehavior-behavior"></a>
The cache behavior of the distribution.  
The following cache behaviors can be specified:  
+ ** `cache` ** - This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content.
+ ** `dont-cache` ** - This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serves only the content that is specified in the distribution’s `CacheBehaviorPerPath` parameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
*Required*: No  
*Type*: String  
*Allowed values*: `dont-cache | cache`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution CacheBehaviorPerPath
<a name="aws-properties-lightsail-distribution-cachebehaviorperpath"></a>

`CacheBehaviorPerPath` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource. It describes the per-path cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.

Use a per-path cache behavior to override the default cache behavior of a distribution, or to add an exception to it. For example, if you set the `CacheBehavior` to `cache`, you can use a per-path cache behavior to specify a directory, file, or file type that your distribution will cache. If you don’t want your distribution to cache a specified directory, file, or file type, set the per-path cache behavior to `dont-cache`. 

## Syntax
<a name="aws-properties-lightsail-distribution-cachebehaviorperpath-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-cachebehaviorperpath-syntax.json"></a>

```
{
  "[Behavior](#cfn-lightsail-distribution-cachebehaviorperpath-behavior)" : String,
  "[Path](#cfn-lightsail-distribution-cachebehaviorperpath-path)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-cachebehaviorperpath-syntax.yaml"></a>

```
  [Behavior](#cfn-lightsail-distribution-cachebehaviorperpath-behavior): String
  [Path](#cfn-lightsail-distribution-cachebehaviorperpath-path): String
```

## Properties
<a name="aws-properties-lightsail-distribution-cachebehaviorperpath-properties"></a>

`Behavior`  <a name="cfn-lightsail-distribution-cachebehaviorperpath-behavior"></a>
The cache behavior for the specified path.  
You can specify one of the following per-path cache behaviors:  
+ ** `cache` ** - This behavior caches the specified path. 
+ ** `dont-cache` ** - This behavior doesn't cache the specified path. 
*Required*: No  
*Type*: String  
*Allowed values*: `dont-cache | cache`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Path`  <a name="cfn-lightsail-distribution-cachebehaviorperpath-path"></a>
The path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (`path/to/assets/*`), and file types (`*.html`, `*jpg`, `*js`). Directories and file paths are case-sensitive.  
Examples:  
+ Specify the following to cache all files in the document root of an Apache web server running on a instance.

   `var/www/html/` 
+ Specify the following file to cache only the index page in the document root of an Apache web server.

   `var/www/html/index.html` 
+ Specify the following to cache only the .html files in the document root of an Apache web server.

   `var/www/html/*.html` 
+ Specify the following to cache only the .jpg, .png, and .gif files in the images sub-directory of the document root of an Apache web server.

   `var/www/html/images/*.jpg` 

   `var/www/html/images/*.png` 

   `var/www/html/images/*.gif` 

  Specify the following to cache all files in the images subdirectory of the document root of an Apache web server.

   `var/www/html/images/` 
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution CacheSettings
<a name="aws-properties-lightsail-distribution-cachesettings"></a>

`CacheSettings` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) 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
<a name="aws-properties-lightsail-distribution-cachesettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-cachesettings-syntax.json"></a>

```
{
  "[AllowedHTTPMethods](#cfn-lightsail-distribution-cachesettings-allowedhttpmethods)" : String,
  "[CachedHTTPMethods](#cfn-lightsail-distribution-cachesettings-cachedhttpmethods)" : String,
  "[DefaultTTL](#cfn-lightsail-distribution-cachesettings-defaultttl)" : Integer,
  "[ForwardedCookies](#cfn-lightsail-distribution-cachesettings-forwardedcookies)" : CookieObject,
  "[ForwardedHeaders](#cfn-lightsail-distribution-cachesettings-forwardedheaders)" : HeaderObject,
  "[ForwardedQueryStrings](#cfn-lightsail-distribution-cachesettings-forwardedquerystrings)" : QueryStringObject,
  "[MaximumTTL](#cfn-lightsail-distribution-cachesettings-maximumttl)" : Integer,
  "[MinimumTTL](#cfn-lightsail-distribution-cachesettings-minimumttl)" : Integer
}
```

### YAML
<a name="aws-properties-lightsail-distribution-cachesettings-syntax.yaml"></a>

```
  [AllowedHTTPMethods](#cfn-lightsail-distribution-cachesettings-allowedhttpmethods): String
  [CachedHTTPMethods](#cfn-lightsail-distribution-cachesettings-cachedhttpmethods): String
  [DefaultTTL](#cfn-lightsail-distribution-cachesettings-defaultttl): Integer
  [ForwardedCookies](#cfn-lightsail-distribution-cachesettings-forwardedcookies): 
    CookieObject
  [ForwardedHeaders](#cfn-lightsail-distribution-cachesettings-forwardedheaders): 
    HeaderObject
  [ForwardedQueryStrings](#cfn-lightsail-distribution-cachesettings-forwardedquerystrings): 
    QueryStringObject
  [MaximumTTL](#cfn-lightsail-distribution-cachesettings-maximumttl): Integer
  [MinimumTTL](#cfn-lightsail-distribution-cachesettings-minimumttl): Integer
```

## Properties
<a name="aws-properties-lightsail-distribution-cachesettings-properties"></a>

`AllowedHTTPMethods`  <a name="cfn-lightsail-distribution-cachesettings-allowedhttpmethods"></a>
The HTTP methods that are processed and forwarded to the distribution's origin.  
You can specify the following options:  
+ `GET,HEAD` - The distribution forwards the `GET` and `HEAD` methods.
+ `GET,HEAD,OPTIONS` - The distribution forwards the `GET`, `HEAD`, and `OPTIONS` methods.
+ `GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE` - The distribution forwards the `GET`, `HEAD`, `OPTIONS`, `PUT`, `PATCH`, `POST`, and `DELETE` methods.
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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CachedHTTPMethods`  <a name="cfn-lightsail-distribution-cachesettings-cachedhttpmethods"></a>
The HTTP method responses that are cached by your distribution.  
You can specify the following options:  
+ `GET,HEAD` - The distribution caches responses to the `GET` and `HEAD` methods.
+ `GET,HEAD,OPTIONS` - The distribution caches responses to the `GET`, `HEAD`, and `OPTIONS` methods.
*Required*: No  
*Type*: String  
*Pattern*: `.*\S.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefaultTTL`  <a name="cfn-lightsail-distribution-cachesettings-defaultttl"></a>
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.  
The value specified applies only when the origin does not add HTTP headers such as `Cache-Control max-age`, `Cache-Control s-maxage`, and `Expires` to objects.
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ForwardedCookies`  <a name="cfn-lightsail-distribution-cachesettings-forwardedcookies"></a>
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](aws-properties-lightsail-distribution-cookieobject.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ForwardedHeaders`  <a name="cfn-lightsail-distribution-cachesettings-forwardedheaders"></a>
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](aws-properties-lightsail-distribution-headerobject.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ForwardedQueryStrings`  <a name="cfn-lightsail-distribution-cachesettings-forwardedquerystrings"></a>
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](aws-properties-lightsail-distribution-querystringobject.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumTTL`  <a name="cfn-lightsail-distribution-cachesettings-maximumttl"></a>
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`, and `Expires` to objects.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumTTL`  <a name="cfn-lightsail-distribution-cachesettings-minimumttl"></a>
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 `0` must be specified for `minimumTTL` if the distribution is configured to forward all headers to the origin.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution CookieObject
<a name="aws-properties-lightsail-distribution-cookieobject"></a>

`CookieObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property. It describes whether an Amazon Lightsail content delivery network (CDN) distribution forwards cookies to the origin and, if so, which ones.

For the cookies that you specify, your distribution caches separate versions of the specified content based on the cookie values in viewer requests.

## Syntax
<a name="aws-properties-lightsail-distribution-cookieobject-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-cookieobject-syntax.json"></a>

```
{
  "[CookiesAllowList](#cfn-lightsail-distribution-cookieobject-cookiesallowlist)" : [ String, ... ],
  "[Option](#cfn-lightsail-distribution-cookieobject-option)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-cookieobject-syntax.yaml"></a>

```
  [CookiesAllowList](#cfn-lightsail-distribution-cookieobject-cookiesallowlist): 
    - String
  [Option](#cfn-lightsail-distribution-cookieobject-option): String
```

## Properties
<a name="aws-properties-lightsail-distribution-cookieobject-properties"></a>

`CookiesAllowList`  <a name="cfn-lightsail-distribution-cookieobject-cookiesallowlist"></a>
The specific cookies to forward to your distribution's origin.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Option`  <a name="cfn-lightsail-distribution-cookieobject-option"></a>
Specifies which cookies to forward to the distribution's origin for a cache behavior.  
Use one of the following configurations for your distribution:  
+ ** `all` ** - Forwards all cookies to your origin.
+ ** `none` ** - Doesn’t forward cookies to your origin.
+ ** `allow-list` ** - Forwards only the cookies that you specify using the `CookiesAllowList` parameter.
*Required*: No  
*Type*: String  
*Allowed values*: `none | allow-list | all`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution HeaderObject
<a name="aws-properties-lightsail-distribution-headerobject"></a>

`HeaderObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property. It describes the request headers used by your distribution, which caches your content based on the request headers.

For the headers that you specify, your distribution caches separate versions of the specified content based on the header values in viewer requests. For example, suppose that viewer requests for logo.jpg contain a custom product header that has a value of either acme or apex. Also, suppose that you configure your distribution to cache your content based on values in the product header. Your distribution forwards the product header to the origin and caches the response from the origin once for each header value.

## Syntax
<a name="aws-properties-lightsail-distribution-headerobject-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-headerobject-syntax.json"></a>

```
{
  "[HeadersAllowList](#cfn-lightsail-distribution-headerobject-headersallowlist)" : [ String, ... ],
  "[Option](#cfn-lightsail-distribution-headerobject-option)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-headerobject-syntax.yaml"></a>

```
  [HeadersAllowList](#cfn-lightsail-distribution-headerobject-headersallowlist): 
    - String
  [Option](#cfn-lightsail-distribution-headerobject-option): String
```

## Properties
<a name="aws-properties-lightsail-distribution-headerobject-properties"></a>

`HeadersAllowList`  <a name="cfn-lightsail-distribution-headerobject-headersallowlist"></a>
The specific headers to forward to your distribution's origin.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Option`  <a name="cfn-lightsail-distribution-headerobject-option"></a>
The headers that you want your distribution to forward to your origin. Your distribution caches your content based on these headers.  
Use one of the following configurations for your distribution:  
+ ** `all` ** - Forwards all headers to your origin..
+ ** `none` ** - Forwards only the default headers.
+ ** `allow-list` ** - Forwards only the headers that you specify using the `HeadersAllowList` parameter.
*Required*: No  
*Type*: String  
*Allowed values*: `none | allow-list | all`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution InputOrigin
<a name="aws-properties-lightsail-distribution-inputorigin"></a>

`InputOrigin` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource. It describes the origin resource of an Amazon Lightsail content delivery network (CDN) distribution.

An origin can be a instance, bucket, or load balancer. A distribution pulls content from an origin, caches it, and serves it to viewers through a worldwide network of edge servers.

## Syntax
<a name="aws-properties-lightsail-distribution-inputorigin-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-inputorigin-syntax.json"></a>

```
{
  "[Name](#cfn-lightsail-distribution-inputorigin-name)" : String,
  "[ProtocolPolicy](#cfn-lightsail-distribution-inputorigin-protocolpolicy)" : String,
  "[RegionName](#cfn-lightsail-distribution-inputorigin-regionname)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-inputorigin-syntax.yaml"></a>

```
  [Name](#cfn-lightsail-distribution-inputorigin-name): String
  [ProtocolPolicy](#cfn-lightsail-distribution-inputorigin-protocolpolicy): String
  [RegionName](#cfn-lightsail-distribution-inputorigin-regionname): String
```

## Properties
<a name="aws-properties-lightsail-distribution-inputorigin-properties"></a>

`Name`  <a name="cfn-lightsail-distribution-inputorigin-name"></a>
The name of the origin resource.  
*Required*: No  
*Type*: String  
*Pattern*: `\w[\w\-]*\w`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProtocolPolicy`  <a name="cfn-lightsail-distribution-inputorigin-protocolpolicy"></a>
The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.  
*Required*: No  
*Type*: String  
*Allowed values*: `http-only | https-only`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RegionName`  <a name="cfn-lightsail-distribution-inputorigin-regionname"></a>
The AWS Region name of the origin resource.  
*Required*: No  
*Type*: String  
*Allowed values*: `us-east-1 | us-east-2 | us-west-1 | us-west-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-central-1 | eu-north-1 | ca-central-1 | ap-south-1 | ap-southeast-1 | ap-southeast-2 | ap-northeast-1 | ap-northeast-2 | ap-southeast-3 | ap-southeast-5`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution QueryStringObject
<a name="aws-properties-lightsail-distribution-querystringobject"></a>

`QueryStringObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property. It describes the query string parameters that an Amazon Lightsail content delivery network (CDN) distribution to bases caching on.

For the query strings that you specify, your distribution caches separate versions of the specified content based on the query string values in viewer requests.

## Syntax
<a name="aws-properties-lightsail-distribution-querystringobject-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-querystringobject-syntax.json"></a>

```
{
  "[Option](#cfn-lightsail-distribution-querystringobject-option)" : Boolean,
  "[QueryStringsAllowList](#cfn-lightsail-distribution-querystringobject-querystringsallowlist)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-lightsail-distribution-querystringobject-syntax.yaml"></a>

```
  [Option](#cfn-lightsail-distribution-querystringobject-option): Boolean
  [QueryStringsAllowList](#cfn-lightsail-distribution-querystringobject-querystringsallowlist): 
    - String
```

## Properties
<a name="aws-properties-lightsail-distribution-querystringobject-properties"></a>

`Option`  <a name="cfn-lightsail-distribution-querystringobject-option"></a>
Indicates whether the distribution forwards and caches based on query strings.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`QueryStringsAllowList`  <a name="cfn-lightsail-distribution-querystringobject-querystringsallowlist"></a>
The specific query strings that the distribution forwards to the origin.  
Your distribution caches content based on the specified query strings.  
If the `option` parameter is true, then your distribution forwards all query strings, regardless of what you specify using the `QueryStringsAllowList` parameter.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Distribution Tag
<a name="aws-properties-lightsail-distribution-tag"></a>

Describes a tag key and optional value assigned to an Amazon Lightsail resource.

For more information about tags in Lightsail, see the [Amazon Lightsail Developer Guide](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags).

## Syntax
<a name="aws-properties-lightsail-distribution-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-distribution-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lightsail-distribution-tag-key)" : String,
  "[Value](#cfn-lightsail-distribution-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lightsail-distribution-tag-syntax.yaml"></a>

```
  [Key](#cfn-lightsail-distribution-tag-key): String
  [Value](#cfn-lightsail-distribution-tag-value): String
```

## Properties
<a name="aws-properties-lightsail-distribution-tag-properties"></a>

`Key`  <a name="cfn-lightsail-distribution-tag-key"></a>
The key of the tag.  
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lightsail-distribution-tag-value"></a>
The value of the tag.  
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)