

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).

# Amazon Lightsail
<a name="AWS_Lightsail"></a>

**Resource types**
+ [AWS::Lightsail::Alarm](aws-resource-lightsail-alarm.md)
+ [AWS::Lightsail::Bucket](aws-resource-lightsail-bucket.md)
+ [AWS::Lightsail::Certificate](aws-resource-lightsail-certificate.md)
+ [AWS::Lightsail::Container](aws-resource-lightsail-container.md)
+ [AWS::Lightsail::Database](aws-resource-lightsail-database.md)
+ [AWS::Lightsail::DatabaseSnapshot](aws-resource-lightsail-databasesnapshot.md)
+ [AWS::Lightsail::Disk](aws-resource-lightsail-disk.md)
+ [AWS::Lightsail::DiskSnapshot](aws-resource-lightsail-disksnapshot.md)
+ [AWS::Lightsail::Distribution](aws-resource-lightsail-distribution.md)
+ [AWS::Lightsail::Domain](aws-resource-lightsail-domain.md)
+ [AWS::Lightsail::Instance](aws-resource-lightsail-instance.md)
+ [AWS::Lightsail::InstanceSnapshot](aws-resource-lightsail-instancesnapshot.md)
+ [AWS::Lightsail::LoadBalancer](aws-resource-lightsail-loadbalancer.md)
+ [AWS::Lightsail::LoadBalancerTlsCertificate](aws-resource-lightsail-loadbalancertlscertificate.md)
+ [AWS::Lightsail::StaticIp](aws-resource-lightsail-staticip.md)

# AWS::Lightsail::Alarm
<a name="aws-resource-lightsail-alarm"></a>

The `AWS::Lightsail::Alarm` resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Alarm",
  "Properties" : {
      "[AlarmName](#cfn-lightsail-alarm-alarmname)" : String,
      "[ComparisonOperator](#cfn-lightsail-alarm-comparisonoperator)" : String,
      "[ContactProtocols](#cfn-lightsail-alarm-contactprotocols)" : [ String, ... ],
      "[DatapointsToAlarm](#cfn-lightsail-alarm-datapointstoalarm)" : Integer,
      "[EvaluationPeriods](#cfn-lightsail-alarm-evaluationperiods)" : Integer,
      "[MetricName](#cfn-lightsail-alarm-metricname)" : String,
      "[MonitoredResourceName](#cfn-lightsail-alarm-monitoredresourcename)" : String,
      "[NotificationEnabled](#cfn-lightsail-alarm-notificationenabled)" : Boolean,
      "[NotificationTriggers](#cfn-lightsail-alarm-notificationtriggers)" : [ String, ... ],
      "[Threshold](#cfn-lightsail-alarm-threshold)" : Number,
      "[TreatMissingData](#cfn-lightsail-alarm-treatmissingdata)" : String
    }
}
```

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

```
Type: AWS::Lightsail::Alarm
Properties:
  [AlarmName](#cfn-lightsail-alarm-alarmname): String
  [ComparisonOperator](#cfn-lightsail-alarm-comparisonoperator): String
  [ContactProtocols](#cfn-lightsail-alarm-contactprotocols): 
    - String
  [DatapointsToAlarm](#cfn-lightsail-alarm-datapointstoalarm): Integer
  [EvaluationPeriods](#cfn-lightsail-alarm-evaluationperiods): Integer
  [MetricName](#cfn-lightsail-alarm-metricname): String
  [MonitoredResourceName](#cfn-lightsail-alarm-monitoredresourcename): String
  [NotificationEnabled](#cfn-lightsail-alarm-notificationenabled): Boolean
  [NotificationTriggers](#cfn-lightsail-alarm-notificationtriggers): 
    - String
  [Threshold](#cfn-lightsail-alarm-threshold): Number
  [TreatMissingData](#cfn-lightsail-alarm-treatmissingdata): String
```

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

`AlarmName`  <a name="cfn-lightsail-alarm-alarmname"></a>
The name of the alarm.  
*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)

`ComparisonOperator`  <a name="cfn-lightsail-alarm-comparisonoperator"></a>
The arithmetic operation to use when comparing the specified statistic and threshold.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `GreaterThanOrEqualToThreshold | GreaterThanThreshold | LessThanThreshold | LessThanOrEqualToThreshold`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContactProtocols`  <a name="cfn-lightsail-alarm-contactprotocols"></a>
The contact protocols for the alarm, such as `Email`, `SMS` (text messaging), or both.  
*Allowed Values*: `Email` \$1 `SMS`  
*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)

`DatapointsToAlarm`  <a name="cfn-lightsail-alarm-datapointstoalarm"></a>
The number of data points within the evaluation periods that must be breaching to cause the alarm to go to the `ALARM` state.  
*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)

`EvaluationPeriods`  <a name="cfn-lightsail-alarm-evaluationperiods"></a>
The number of periods over which data is compared to the specified threshold.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricName`  <a name="cfn-lightsail-alarm-metricname"></a>
The name of the metric associated with the alarm.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `CPUUtilization | NetworkIn | NetworkOut | StatusCheckFailed | StatusCheckFailed_Instance | StatusCheckFailed_System | ClientTLSNegotiationErrorCount | HealthyHostCount | UnhealthyHostCount | HTTPCode_LB_4XX_Count | HTTPCode_LB_5XX_Count | HTTPCode_Instance_2XX_Count | HTTPCode_Instance_3XX_Count | HTTPCode_Instance_4XX_Count | HTTPCode_Instance_5XX_Count | InstanceResponseTime | RejectedConnectionCount | RequestCount | DatabaseConnections | DiskQueueDepth | FreeStorageSpace | NetworkReceiveThroughput | NetworkTransmitThroughput | BurstCapacityTime | BurstCapacityPercentage`  
*Update requires*: Updates are not supported.

`MonitoredResourceName`  <a name="cfn-lightsail-alarm-monitoredresourcename"></a>
The name of the Lightsail resource that the alarm monitors.  
*Required*: Yes  
*Type*: String  
*Update requires*: Updates are not supported.

`NotificationEnabled`  <a name="cfn-lightsail-alarm-notificationenabled"></a>
A Boolean value indicating whether the alarm 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)

`NotificationTriggers`  <a name="cfn-lightsail-alarm-notificationtriggers"></a>
The alarm states that trigger a notification.  
To specify the `OK` and `INSUFFICIENT_DATA` values, you must also specify `ContactProtocols` values. Otherwise, the `OK` and `INSUFFICIENT_DATA` values will not take effect and the stack will drift.
*Allowed Values*: `OK` \$1 `ALARM` \$1 `INSUFFICIENT_DATA`  
*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)

`Threshold`  <a name="cfn-lightsail-alarm-threshold"></a>
The value against which the specified statistic is compared.  
*Required*: Yes  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TreatMissingData`  <a name="cfn-lightsail-alarm-treatmissingdata"></a>
Specifies how the alarm handles missing data points.  
An alarm can treat missing data in the following ways:  
+ `breaching` - Assumes the missing data is not within the threshold. Missing data counts towards the number of times that the metric is not within the threshold.
+ `notBreaching` - Assumes the missing data is within the threshold. Missing data does not count towards the number of times that the metric is not within the threshold.
+ `ignore` - Ignores the missing data. Maintains the current alarm state.
+ `missing` - Missing data is treated as missing.
*Required*: No  
*Type*: String  
*Allowed values*: `breaching | notBreaching | ignore | missing`  
*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-alarm-return-values"></a>

### Ref
<a name="aws-resource-lightsail-alarm-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-alarm-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-alarm-return-values-fn--getatt-fn--getatt"></a>

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

`State`  <a name="State-fn::getatt"></a>
The current state of the alarm.  
An alarm has the following possible states:  
+ `ALARM` - The metric is outside of the defined threshold.
+ `INSUFFICIENT_DATA` - The alarm has recently started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
+ `OK` - The metric is within the defined threshold.

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

 *Notification triggers* 

To specify the `OK` and `INSUFFICIENT_DATA` values of the `NotificationTriggers` parameter, you must also specify `ContactProtocols` values. Otherwise, the `OK` and `INSUFFICIENT_DATA` values of the `NotificationTriggers` parameter will not take effect and the stack will drift.

# AWS::Lightsail::Bucket
<a name="aws-resource-lightsail-bucket"></a>

The `AWS::Lightsail::Bucket` resource specifies a bucket.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Bucket",
  "Properties" : {
      "[AccessRules](#cfn-lightsail-bucket-accessrules)" : AccessRules,
      "[BucketName](#cfn-lightsail-bucket-bucketname)" : String,
      "[BundleId](#cfn-lightsail-bucket-bundleid)" : String,
      "[ObjectVersioning](#cfn-lightsail-bucket-objectversioning)" : Boolean,
      "[ReadOnlyAccessAccounts](#cfn-lightsail-bucket-readonlyaccessaccounts)" : [ String, ... ],
      "[ResourcesReceivingAccess](#cfn-lightsail-bucket-resourcesreceivingaccess)" : [ String, ... ],
      "[Tags](#cfn-lightsail-bucket-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Bucket
Properties:
  [AccessRules](#cfn-lightsail-bucket-accessrules): 
    AccessRules
  [BucketName](#cfn-lightsail-bucket-bucketname): String
  [BundleId](#cfn-lightsail-bucket-bundleid): String
  [ObjectVersioning](#cfn-lightsail-bucket-objectversioning): Boolean
  [ReadOnlyAccessAccounts](#cfn-lightsail-bucket-readonlyaccessaccounts): 
    - String
  [ResourcesReceivingAccess](#cfn-lightsail-bucket-resourcesreceivingaccess): 
    - String
  [Tags](#cfn-lightsail-bucket-tags): 
    - Tag
```

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

`AccessRules`  <a name="cfn-lightsail-bucket-accessrules"></a>
An object that describes the access rules for the bucket.  
*Required*: No  
*Type*: [AccessRules](aws-properties-lightsail-bucket-accessrules.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BucketName`  <a name="cfn-lightsail-bucket-bucketname"></a>
The name of the bucket.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-z0-9][a-z0-9-]{1,52}[a-z0-9]$`  
*Minimum*: `3`  
*Maximum*: `54`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`BundleId`  <a name="cfn-lightsail-bucket-bundleid"></a>
The bundle ID for the bucket (for example, `small_1_0`).  
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.  
*Required*: Yes  
*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)

`ObjectVersioning`  <a name="cfn-lightsail-bucket-objectversioning"></a>
Indicates whether object versioning is enabled for the bucket.  
The following options can be configured:  
+ `Enabled` - Object versioning is enabled.
+ `Suspended` - Object versioning was previously enabled but is currently suspended. Existing object versions are retained.
+ `NeverEnabled` - Object versioning has never been enabled.
*Required*: No  
*Type*: Boolean  
*Pattern*: `.*\S.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReadOnlyAccessAccounts`  <a name="cfn-lightsail-bucket-readonlyaccessaccounts"></a>
An array of AWS account IDs that have read-only access to the bucket.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourcesReceivingAccess`  <a name="cfn-lightsail-bucket-resourcesreceivingaccess"></a>
An array of Lightsail instances that have access to the bucket.  
*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)

`Tags`  <a name="cfn-lightsail-bucket-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-bucket-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-bucket-return-values"></a>

### Ref
<a name="aws-resource-lightsail-bucket-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-bucket-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-bucket-return-values-fn--getatt-fn--getatt"></a>

`AbleToUpdateBundle`  <a name="AbleToUpdateBundle-fn::getatt"></a>
A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle.

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

`Url`  <a name="Url-fn::getatt"></a>
The URL of the bucket.

# AWS::Lightsail::Bucket AccessRules
<a name="aws-properties-lightsail-bucket-accessrules"></a>

`AccessRules` is a property of the [AWS::Lightsail::Bucket](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-bucket.html) resource. It describes access rules for a bucket.

## Syntax
<a name="aws-properties-lightsail-bucket-accessrules-syntax"></a>

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

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

```
{
  "[AllowPublicOverrides](#cfn-lightsail-bucket-accessrules-allowpublicoverrides)" : Boolean,
  "[GetObject](#cfn-lightsail-bucket-accessrules-getobject)" : String
}
```

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

```
  [AllowPublicOverrides](#cfn-lightsail-bucket-accessrules-allowpublicoverrides): Boolean
  [GetObject](#cfn-lightsail-bucket-accessrules-getobject): String
```

## Properties
<a name="aws-properties-lightsail-bucket-accessrules-properties"></a>

`AllowPublicOverrides`  <a name="cfn-lightsail-bucket-accessrules-allowpublicoverrides"></a>
A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override the `GetObject` option that is currently specified.  
When this is true, you can use the [PutObjectAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html) Amazon S3 API operation to set individual objects to public (read-only) or private, using either the `public-read` ACL or the `private` ACL.  
*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)

`GetObject`  <a name="cfn-lightsail-bucket-accessrules-getobject"></a>
Specifies the anonymous access to all objects in a bucket.  
The following options can be specified:  
+ `public` - Sets all objects in the bucket to public (read-only), making them readable by everyone on the internet.

  If the `GetObject` value is set to `public`, then all objects in the bucket default to public regardless of the `allowPublicOverrides` value.
+ `private` - Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to.

  If the `GetObject` value is set to `private`, and the `allowPublicOverrides` value is set to `true`, then all objects in the bucket default to private unless they are configured with a `public-read` ACL. Individual objects with a `public-read` ACL are readable by everyone on the internet.
*Required*: No  
*Type*: String  
*Allowed values*: `public | private`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Bucket Tag
<a name="aws-properties-lightsail-bucket-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-bucket-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-bucket-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-bucket-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)

# AWS::Lightsail::Certificate
<a name="aws-resource-lightsail-certificate"></a>

The `AWS::Lightsail::Certificate` resource specifies an SSL/TLS certificate that you can use with a content delivery network (CDN) distribution and a container service.

**Note**  
For information about certificates that you can use with a load balancer, see [AWS::Lightsail::LoadBalancerTlsCertificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancertlscertificate.html).

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

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

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

```
{
  "Type" : "AWS::Lightsail::Certificate",
  "Properties" : {
      "[CertificateName](#cfn-lightsail-certificate-certificatename)" : String,
      "[DomainName](#cfn-lightsail-certificate-domainname)" : String,
      "[SubjectAlternativeNames](#cfn-lightsail-certificate-subjectalternativenames)" : [ String, ... ],
      "[Tags](#cfn-lightsail-certificate-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Certificate
Properties:
  [CertificateName](#cfn-lightsail-certificate-certificatename): String
  [DomainName](#cfn-lightsail-certificate-domainname): String
  [SubjectAlternativeNames](#cfn-lightsail-certificate-subjectalternativenames): 
    - String
  [Tags](#cfn-lightsail-certificate-tags): 
    - Tag
```

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

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

`DomainName`  <a name="cfn-lightsail-certificate-domainname"></a>
The domain name of the certificate.  
*Required*: Yes  
*Type*: String  
*Update requires*: Updates are not supported.

`SubjectAlternativeNames`  <a name="cfn-lightsail-certificate-subjectalternativenames"></a>
An array of strings that specify the alternate domains (such as `example.org`) and subdomains (such as `blog.example.com`) of the certificate.   
*Required*: No  
*Type*: Array of String  
*Update requires*: Updates are not supported.

`Tags`  <a name="cfn-lightsail-certificate-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-certificate-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-certificate-return-values"></a>

### Ref
<a name="aws-resource-lightsail-certificate-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-certificate-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-certificate-return-values-fn--getatt-fn--getatt"></a>

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

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

# AWS::Lightsail::Certificate Tag
<a name="aws-properties-lightsail-certificate-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-certificate-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-certificate-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-certificate-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)

# AWS::Lightsail::Container
<a name="aws-resource-lightsail-container"></a>

The `AWS::Lightsail::Container` resource specifies a container service.

A Lightsail container service is a compute resource to which you can deploy containers.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Container",
  "Properties" : {
      "[ContainerServiceDeployment](#cfn-lightsail-container-containerservicedeployment)" : ContainerServiceDeployment,
      "[IsDisabled](#cfn-lightsail-container-isdisabled)" : Boolean,
      "[Power](#cfn-lightsail-container-power)" : String,
      "[PrivateRegistryAccess](#cfn-lightsail-container-privateregistryaccess)" : PrivateRegistryAccess,
      "[PublicDomainNames](#cfn-lightsail-container-publicdomainnames)" : [ PublicDomainName, ... ],
      "[Scale](#cfn-lightsail-container-scale)" : Integer,
      "[ServiceName](#cfn-lightsail-container-servicename)" : String,
      "[Tags](#cfn-lightsail-container-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Container
Properties:
  [ContainerServiceDeployment](#cfn-lightsail-container-containerservicedeployment): 
    ContainerServiceDeployment
  [IsDisabled](#cfn-lightsail-container-isdisabled): Boolean
  [Power](#cfn-lightsail-container-power): String
  [PrivateRegistryAccess](#cfn-lightsail-container-privateregistryaccess): 
    PrivateRegistryAccess
  [PublicDomainNames](#cfn-lightsail-container-publicdomainnames): 
    - PublicDomainName
  [Scale](#cfn-lightsail-container-scale): Integer
  [ServiceName](#cfn-lightsail-container-servicename): String
  [Tags](#cfn-lightsail-container-tags): 
    - Tag
```

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

`ContainerServiceDeployment`  <a name="cfn-lightsail-container-containerservicedeployment"></a>
An object that describes the current container deployment of the container service.  
*Required*: No  
*Type*: [ContainerServiceDeployment](aws-properties-lightsail-container-containerservicedeployment.md)  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`IsDisabled`  <a name="cfn-lightsail-container-isdisabled"></a>
A Boolean value indicating whether the container service is disabled.  
*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)

`Power`  <a name="cfn-lightsail-container-power"></a>
The power specification of the container service.  
The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `nano | micro | small | medium | large | xlarge`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PrivateRegistryAccess`  <a name="cfn-lightsail-container-privateregistryaccess"></a>
An object that describes the configuration for the container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.  
For more information, see [Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-service-ecr-private-repo-access) in the *Amazon Lightsail Developer Guide*.  
*Required*: No  
*Type*: [PrivateRegistryAccess](aws-properties-lightsail-container-privateregistryaccess.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicDomainNames`  <a name="cfn-lightsail-container-publicdomainnames"></a>
The public domain name of the container service, such as `example.com` and `www.example.com`.  
You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container that is configured as the public endpoint of your container service.  
If you don't specify public domain names, then you can use the default domain of the container service.  
You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the [AWS::Lightsail::Certificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-certificate.html) resource to create a certificate for the public domain names that you want to use with your container service.
*Required*: No  
*Type*: Array of [PublicDomainName](aws-properties-lightsail-container-publicdomainname.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Scale`  <a name="cfn-lightsail-container-scale"></a>
The scale specification of the container service.  
The scale specifies the allocated compute nodes of the container service.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `20`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-lightsail-container-servicename"></a>
The name of the container service.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-z0-9]{1,2}|[a-z0-9][a-z0-9-]+[a-z0-9]$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lightsail-container-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-container-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-container-return-values"></a>

### Ref
<a name="aws-resource-lightsail-container-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-container-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-container-return-values-fn--getatt-fn--getatt"></a>

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

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

`PrivateRegistryAccess.EcrImagePullerRole.PrincipalArn`  <a name="PrivateRegistryAccess.EcrImagePullerRole.PrincipalArn-fn::getatt"></a>
The principle Amazon Resource Name (ARN) of the role.

`Url`  <a name="Url-fn::getatt"></a>
The publicly accessible URL of the container service.  
If no public endpoint is specified in the current deployment, this URL returns a 404 response.

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

 *Container deployment failures* 

The stack will drift if the deployment to your `ContainerService` fails. This is because the template will have a different deployment compared to the container service.

# AWS::Lightsail::Container Container
<a name="aws-properties-lightsail-container-container"></a>

`Container` is a property of the [ContainerServiceDeployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html) property. It describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.

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

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

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

```
{
  "[Command](#cfn-lightsail-container-container-command)" : [ String, ... ],
  "[ContainerName](#cfn-lightsail-container-container-containername)" : String,
  "[Environment](#cfn-lightsail-container-container-environment)" : [ EnvironmentVariable, ... ],
  "[Image](#cfn-lightsail-container-container-image)" : String,
  "[Ports](#cfn-lightsail-container-container-ports)" : [ PortInfo, ... ]
}
```

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

```
  [Command](#cfn-lightsail-container-container-command): 
    - String
  [ContainerName](#cfn-lightsail-container-container-containername): String
  [Environment](#cfn-lightsail-container-container-environment): 
    - EnvironmentVariable
  [Image](#cfn-lightsail-container-container-image): String
  [Ports](#cfn-lightsail-container-container-ports): 
    - PortInfo
```

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

`Command`  <a name="cfn-lightsail-container-container-command"></a>
The launch command for the container.  
*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)

`ContainerName`  <a name="cfn-lightsail-container-container-containername"></a>
The name of the container.  
*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)

`Environment`  <a name="cfn-lightsail-container-container-environment"></a>
The environment variables of the container.  
*Required*: No  
*Type*: Array of [EnvironmentVariable](aws-properties-lightsail-container-environmentvariable.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Image`  <a name="cfn-lightsail-container-container-image"></a>
The name of the image used for the container.  
Container images that are sourced from (registered and stored on) your container service start with a colon (`:`). For example, if your container service name is `container-service-1`, the container image label is `mystaticsite`, and you want to use the third version (`3`) of the registered container image, then you should specify `:container-service-1.mystaticsite.3`. To use the latest version of a container image, specify `latest` instead of a version number (for example, `:container-service-1.mystaticsite.latest`). Your container service will automatically use the highest numbered version of the registered container image.  
Container images that are sourced from a public registry like Docker Hub don’t start with a colon. For example, `nginx:latest` or `nginx`.  
*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)

`Ports`  <a name="cfn-lightsail-container-container-ports"></a>
An object that describes the open firewall ports and protocols of the container.  
*Required*: No  
*Type*: Array of [PortInfo](aws-properties-lightsail-container-portinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Container ContainerServiceDeployment
<a name="aws-properties-lightsail-container-containerservicedeployment"></a>

`ContainerServiceDeployment` is a property of the [AWS::Lightsail::Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-container.html) resource. It describes a container deployment configuration of a container service.

A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your container service.

## Syntax
<a name="aws-properties-lightsail-container-containerservicedeployment-syntax"></a>

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

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

```
{
  "[Containers](#cfn-lightsail-container-containerservicedeployment-containers)" : [ Container, ... ],
  "[PublicEndpoint](#cfn-lightsail-container-containerservicedeployment-publicendpoint)" : PublicEndpoint
}
```

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

```
  [Containers](#cfn-lightsail-container-containerservicedeployment-containers): 
    - Container
  [PublicEndpoint](#cfn-lightsail-container-containerservicedeployment-publicendpoint): 
    PublicEndpoint
```

## Properties
<a name="aws-properties-lightsail-container-containerservicedeployment-properties"></a>

`Containers`  <a name="cfn-lightsail-container-containerservicedeployment-containers"></a>
An object that describes the configuration for the containers of the deployment.  
*Required*: No  
*Type*: Array of [Container](aws-properties-lightsail-container-container.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicEndpoint`  <a name="cfn-lightsail-container-containerservicedeployment-publicendpoint"></a>
An object that describes the endpoint of the deployment.  
*Required*: No  
*Type*: [PublicEndpoint](aws-properties-lightsail-container-publicendpoint.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Container EcrImagePullerRole
<a name="aws-properties-lightsail-container-ecrimagepullerrole"></a>

Describes the IAM role that you can use to grant a Lightsail container service access to Amazon ECR private repositories.

## Syntax
<a name="aws-properties-lightsail-container-ecrimagepullerrole-syntax"></a>

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

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

```
{
  "[IsActive](#cfn-lightsail-container-ecrimagepullerrole-isactive)" : Boolean,
  "[PrincipalArn](#cfn-lightsail-container-ecrimagepullerrole-principalarn)" : String
}
```

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

```
  [IsActive](#cfn-lightsail-container-ecrimagepullerrole-isactive): Boolean
  [PrincipalArn](#cfn-lightsail-container-ecrimagepullerrole-principalarn): String
```

## Properties
<a name="aws-properties-lightsail-container-ecrimagepullerrole-properties"></a>

`IsActive`  <a name="cfn-lightsail-container-ecrimagepullerrole-isactive"></a>
A boolean value that indicates whether the `ECRImagePullerRole` is active.  
*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)

`PrincipalArn`  <a name="cfn-lightsail-container-ecrimagepullerrole-principalarn"></a>
The principle Amazon Resource Name (ARN) of the role. This property is read-only.  
*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::Container EnvironmentVariable
<a name="aws-properties-lightsail-container-environmentvariable"></a>

`EnvironmentVariable` is a property of the [Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html) property. It describes the environment variables of a container on a container service which are key-value parameters that provide dynamic configuration of the application or script run by the container.

## Syntax
<a name="aws-properties-lightsail-container-environmentvariable-syntax"></a>

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

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

```
{
  "[Value](#cfn-lightsail-container-environmentvariable-value)" : String,
  "[Variable](#cfn-lightsail-container-environmentvariable-variable)" : String
}
```

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

```
  [Value](#cfn-lightsail-container-environmentvariable-value): String
  [Variable](#cfn-lightsail-container-environmentvariable-variable): String
```

## Properties
<a name="aws-properties-lightsail-container-environmentvariable-properties"></a>

`Value`  <a name="cfn-lightsail-container-environmentvariable-value"></a>
The environment variable value.  
*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)

`Variable`  <a name="cfn-lightsail-container-environmentvariable-variable"></a>
The environment variable key.  
*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::Container HealthCheckConfig
<a name="aws-properties-lightsail-container-healthcheckconfig"></a>

`HealthCheckConfig` is a property of the [PublicEndpoint](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicendpoint.html) property. It describes the healthcheck configuration of a container deployment on a container service.

## Syntax
<a name="aws-properties-lightsail-container-healthcheckconfig-syntax"></a>

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

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

```
{
  "[HealthyThreshold](#cfn-lightsail-container-healthcheckconfig-healthythreshold)" : Integer,
  "[IntervalSeconds](#cfn-lightsail-container-healthcheckconfig-intervalseconds)" : Integer,
  "[Path](#cfn-lightsail-container-healthcheckconfig-path)" : String,
  "[SuccessCodes](#cfn-lightsail-container-healthcheckconfig-successcodes)" : String,
  "[TimeoutSeconds](#cfn-lightsail-container-healthcheckconfig-timeoutseconds)" : Integer,
  "[UnhealthyThreshold](#cfn-lightsail-container-healthcheckconfig-unhealthythreshold)" : Integer
}
```

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

```
  [HealthyThreshold](#cfn-lightsail-container-healthcheckconfig-healthythreshold): Integer
  [IntervalSeconds](#cfn-lightsail-container-healthcheckconfig-intervalseconds): Integer
  [Path](#cfn-lightsail-container-healthcheckconfig-path): String
  [SuccessCodes](#cfn-lightsail-container-healthcheckconfig-successcodes): String
  [TimeoutSeconds](#cfn-lightsail-container-healthcheckconfig-timeoutseconds): Integer
  [UnhealthyThreshold](#cfn-lightsail-container-healthcheckconfig-unhealthythreshold): Integer
```

## Properties
<a name="aws-properties-lightsail-container-healthcheckconfig-properties"></a>

`HealthyThreshold`  <a name="cfn-lightsail-container-healthcheckconfig-healthythreshold"></a>
The number of consecutive health check successes required before moving the container to the `Healthy` state. The default value is `2`.  
*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)

`IntervalSeconds`  <a name="cfn-lightsail-container-healthcheckconfig-intervalseconds"></a>
The approximate interval, in seconds, between health checks of an individual container. You can specify between `5` and `300` seconds. The default value is `5`.  
*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)

`Path`  <a name="cfn-lightsail-container-healthcheckconfig-path"></a>
The path on the container on which to perform the health check. The default value is `/`.  
*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)

`SuccessCodes`  <a name="cfn-lightsail-container-healthcheckconfig-successcodes"></a>
The HTTP codes to use when checking for a successful response from a container. You can specify values between `200` and `499`. You can specify multiple values (for example, `200,202`) or a range of values (for example, `200-299`).  
*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)

`TimeoutSeconds`  <a name="cfn-lightsail-container-healthcheckconfig-timeoutseconds"></a>
The amount of time, in seconds, during which no response means a failed health check. You can specify between `2` and `60` seconds. The default value is `2`.  
*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)

`UnhealthyThreshold`  <a name="cfn-lightsail-container-healthcheckconfig-unhealthythreshold"></a>
The number of consecutive health check failures required before moving the container to the `Unhealthy` state. The default value is `2`.  
*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::Container PortInfo
<a name="aws-properties-lightsail-container-portinfo"></a>

`PortInfo` is a property of the [Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-container.html) property. It describes the ports to open and the protocols to use for a container on a Amazon Lightsail container service.

## Syntax
<a name="aws-properties-lightsail-container-portinfo-syntax"></a>

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

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

```
{
  "[Port](#cfn-lightsail-container-portinfo-port)" : String,
  "[Protocol](#cfn-lightsail-container-portinfo-protocol)" : String
}
```

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

```
  [Port](#cfn-lightsail-container-portinfo-port): String
  [Protocol](#cfn-lightsail-container-portinfo-protocol): String
```

## Properties
<a name="aws-properties-lightsail-container-portinfo-properties"></a>

`Port`  <a name="cfn-lightsail-container-portinfo-port"></a>
The open firewall ports of the container.  
*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)

`Protocol`  <a name="cfn-lightsail-container-portinfo-protocol"></a>
The protocol name for the open ports.  
*Allowed values*: `HTTP` \$1 `HTTPS` \$1 `TCP` \$1 `UDP`  
*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::Container PrivateRegistryAccess
<a name="aws-properties-lightsail-container-privateregistryaccess"></a>

Describes the configuration for an Amazon Lightsail container service to access private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.

For more information, see [Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-container-service-ecr-private-repo-access) in the *Amazon Lightsail Developer Guide*.

## Syntax
<a name="aws-properties-lightsail-container-privateregistryaccess-syntax"></a>

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

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

```
{
  "[EcrImagePullerRole](#cfn-lightsail-container-privateregistryaccess-ecrimagepullerrole)" : EcrImagePullerRole
}
```

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

```
  [EcrImagePullerRole](#cfn-lightsail-container-privateregistryaccess-ecrimagepullerrole): 
    EcrImagePullerRole
```

## Properties
<a name="aws-properties-lightsail-container-privateregistryaccess-properties"></a>

`EcrImagePullerRole`  <a name="cfn-lightsail-container-privateregistryaccess-ecrimagepullerrole"></a>
An object that describes the activation status of the role that you can use to grant a Lightsail container service access to Amazon ECR private repositories. If the role is activated, the Amazon Resource Name (ARN) of the role is also listed.  
*Required*: No  
*Type*: [EcrImagePullerRole](aws-properties-lightsail-container-ecrimagepullerrole.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Container PublicDomainName
<a name="aws-properties-lightsail-container-publicdomainname"></a>

`PublicDomainName` is a property of the [AWS::Lightsail::Container](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-container.html) resource. It describes the public domain names to use with a container service, such as `example.com` and `www.example.com`. It also describes the certificates to use with a container service.

## Syntax
<a name="aws-properties-lightsail-container-publicdomainname-syntax"></a>

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

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

```
{
  "[CertificateName](#cfn-lightsail-container-publicdomainname-certificatename)" : String,
  "[DomainNames](#cfn-lightsail-container-publicdomainname-domainnames)" : [ String, ... ]
}
```

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

```
  [CertificateName](#cfn-lightsail-container-publicdomainname-certificatename): String
  [DomainNames](#cfn-lightsail-container-publicdomainname-domainnames): 
    - String
```

## Properties
<a name="aws-properties-lightsail-container-publicdomainname-properties"></a>

`CertificateName`  <a name="cfn-lightsail-container-publicdomainname-certificatename"></a>
The name of the certificate for the public domains.  
*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)

`DomainNames`  <a name="cfn-lightsail-container-publicdomainname-domainnames"></a>
The public domain names to use with the container service.  
*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::Container PublicEndpoint
<a name="aws-properties-lightsail-container-publicendpoint"></a>

`PublicEndpoint` is a property of the [ContainerServiceDeployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-containerservicedeployment.html) property. It describes describes the settings of the public endpoint of a container on a container service.

## Syntax
<a name="aws-properties-lightsail-container-publicendpoint-syntax"></a>

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

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

```
{
  "[ContainerName](#cfn-lightsail-container-publicendpoint-containername)" : String,
  "[ContainerPort](#cfn-lightsail-container-publicendpoint-containerport)" : Integer,
  "[HealthCheckConfig](#cfn-lightsail-container-publicendpoint-healthcheckconfig)" : HealthCheckConfig
}
```

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

```
  [ContainerName](#cfn-lightsail-container-publicendpoint-containername): String
  [ContainerPort](#cfn-lightsail-container-publicendpoint-containerport): Integer
  [HealthCheckConfig](#cfn-lightsail-container-publicendpoint-healthcheckconfig): 
    HealthCheckConfig
```

## Properties
<a name="aws-properties-lightsail-container-publicendpoint-properties"></a>

`ContainerName`  <a name="cfn-lightsail-container-publicendpoint-containername"></a>
The name of the container entry of the deployment that the endpoint configuration applies to.  
*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)

`ContainerPort`  <a name="cfn-lightsail-container-publicendpoint-containerport"></a>
The port of the specified container to which traffic is forwarded to.  
*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)

`HealthCheckConfig`  <a name="cfn-lightsail-container-publicendpoint-healthcheckconfig"></a>
An object that describes the health check configuration of the container.  
*Required*: No  
*Type*: [HealthCheckConfig](aws-properties-lightsail-container-healthcheckconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Container Tag
<a name="aws-properties-lightsail-container-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-container-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-container-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-container-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)

# AWS::Lightsail::Database
<a name="aws-resource-lightsail-database"></a>

The `AWS::Lightsail::Database` resource specifies an Amazon Lightsail database.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Database",
  "Properties" : {
      "[AvailabilityZone](#cfn-lightsail-database-availabilityzone)" : String,
      "[BackupRetention](#cfn-lightsail-database-backupretention)" : Boolean,
      "[CaCertificateIdentifier](#cfn-lightsail-database-cacertificateidentifier)" : String,
      "[MasterDatabaseName](#cfn-lightsail-database-masterdatabasename)" : String,
      "[MasterUsername](#cfn-lightsail-database-masterusername)" : String,
      "[MasterUserPassword](#cfn-lightsail-database-masteruserpassword)" : String,
      "[PreferredBackupWindow](#cfn-lightsail-database-preferredbackupwindow)" : String,
      "[PreferredMaintenanceWindow](#cfn-lightsail-database-preferredmaintenancewindow)" : String,
      "[PubliclyAccessible](#cfn-lightsail-database-publiclyaccessible)" : Boolean,
      "[RelationalDatabaseBlueprintId](#cfn-lightsail-database-relationaldatabaseblueprintid)" : String,
      "[RelationalDatabaseBundleId](#cfn-lightsail-database-relationaldatabasebundleid)" : String,
      "[RelationalDatabaseName](#cfn-lightsail-database-relationaldatabasename)" : String,
      "[RelationalDatabaseParameters](#cfn-lightsail-database-relationaldatabaseparameters)" : [ RelationalDatabaseParameter, ... ],
      "[RotateMasterUserPassword](#cfn-lightsail-database-rotatemasteruserpassword)" : Boolean,
      "[Tags](#cfn-lightsail-database-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Database
Properties:
  [AvailabilityZone](#cfn-lightsail-database-availabilityzone): String
  [BackupRetention](#cfn-lightsail-database-backupretention): Boolean
  [CaCertificateIdentifier](#cfn-lightsail-database-cacertificateidentifier): String
  [MasterDatabaseName](#cfn-lightsail-database-masterdatabasename): String
  [MasterUsername](#cfn-lightsail-database-masterusername): String
  [MasterUserPassword](#cfn-lightsail-database-masteruserpassword): String
  [PreferredBackupWindow](#cfn-lightsail-database-preferredbackupwindow): String
  [PreferredMaintenanceWindow](#cfn-lightsail-database-preferredmaintenancewindow): String
  [PubliclyAccessible](#cfn-lightsail-database-publiclyaccessible): Boolean
  [RelationalDatabaseBlueprintId](#cfn-lightsail-database-relationaldatabaseblueprintid): String
  [RelationalDatabaseBundleId](#cfn-lightsail-database-relationaldatabasebundleid): String
  [RelationalDatabaseName](#cfn-lightsail-database-relationaldatabasename): String
  [RelationalDatabaseParameters](#cfn-lightsail-database-relationaldatabaseparameters): 
    - RelationalDatabaseParameter
  [RotateMasterUserPassword](#cfn-lightsail-database-rotatemasteruserpassword): Boolean
  [Tags](#cfn-lightsail-database-tags): 
    - Tag
```

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

`AvailabilityZone`  <a name="cfn-lightsail-database-availabilityzone"></a>
The Availability Zone for the database.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`BackupRetention`  <a name="cfn-lightsail-database-backupretention"></a>
A Boolean value indicating whether automated backup retention is enabled for the database. Data Import Mode is enabled when `BackupRetention` is set to `false`, and is disabled when `BackupRetention` is set to `true`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`CaCertificateIdentifier`  <a name="cfn-lightsail-database-cacertificateidentifier"></a>
The certificate associated with the database.  
*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)

`MasterDatabaseName`  <a name="cfn-lightsail-database-masterdatabasename"></a>
The meaning of this parameter differs according to the database engine you use.  
 **MySQL**   
The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, no database is created in the database resource.  
Constraints:  
+ Must contain 1-64 letters or numbers.
+ Must begin with a letter. Subsequent characters can be letters, underscores, or numbers (0-9).
+ Can't be a word reserved by the specified database engine.

  For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for [MySQL 5.6](https://dev.mysql.com/doc/refman/5.6/en/keywords.html), [MySQL 5.7](https://dev.mysql.com/doc/refman/5.7/en/keywords.html), and [MySQL 8.0](https://dev.mysql.com/doc/refman/8.0/en/keywords.html).
 **PostgreSQL**   
The name of the database to create when the Lightsail database resource is created. If this parameter isn't specified, a database named `postgres` is created in the database resource.  
Constraints:  
+ Must contain 1-63 letters or numbers.
+ Must begin with a letter. Subsequent characters can be letters, underscores, or numbers (0-9).
+ Can't be a word reserved by the specified database engine.

  For more information about reserved words in PostgreSQL, see the SQL Key Words articles for [PostgreSQL 9.6](https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html), [PostgreSQL 10](https://www.postgresql.org/docs/10/sql-keywords-appendix.html), [PostgreSQL 11](https://www.postgresql.org/docs/11/sql-keywords-appendix.html), and [PostgreSQL 12](https://www.postgresql.org/docs/12/sql-keywords-appendix.html).
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`MasterUsername`  <a name="cfn-lightsail-database-masterusername"></a>
The name for the primary user.  
 **MySQL**   
Constraints:  
+ Required for MySQL.
+ Must be 1-16 letters or numbers. Can contain underscores.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.

  For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for [MySQL 5.6](https://dev.mysql.com/doc/refman/5.6/en/keywords.html), [MySQL 5.7](https://dev.mysql.com/doc/refman/5.7/en/keywords.html), or [MySQL 8.0](https://dev.mysql.com/doc/refman/8.0/en/keywords.html).
 **PostgreSQL**   
Constraints:  
+ Required for PostgreSQL.
+ Must be 1-63 letters or numbers. Can contain underscores.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.

  For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords and Reserved Words articles for [PostgreSQL 9.6](https://www.postgresql.org/docs/9.6/sql-keywords-appendix.html), [PostgreSQL 10](https://www.postgresql.org/docs/10/sql-keywords-appendix.html), [PostgreSQL 11](https://www.postgresql.org/docs/11/sql-keywords-appendix.html), and [PostgreSQL 12](https://www.postgresql.org/docs/12/sql-keywords-appendix.html).
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: Updates are not supported.

`MasterUserPassword`  <a name="cfn-lightsail-database-masteruserpassword"></a>
The password for the primary user of the database. The password can include any printable ASCII character except the following: /, ", or @. It cannot contain spaces.  
The `MasterUserPassword` and `RotateMasterUserPassword` parameters cannot be used together in the same template.
 **MySQL**   
Constraints: Must contain 8-41 characters.  
 **PostgreSQL**   
Constraints: Must contain 8-128 characters.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreferredBackupWindow`  <a name="cfn-lightsail-database-preferredbackupwindow"></a>
The daily time range during which automated backups are created for the database (for example, `16:00-16:30`).  
*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)

`PreferredMaintenanceWindow`  <a name="cfn-lightsail-database-preferredmaintenancewindow"></a>
The weekly time range during which system maintenance can occur for the database, formatted as follows: `ddd:hh24:mi-ddd:hh24:mi`. For example, `Tue:17:00-Tue:17:30`.  
*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)

`PubliclyAccessible`  <a name="cfn-lightsail-database-publiclyaccessible"></a>
A Boolean value indicating whether the database is accessible to anyone on the internet.  
*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)

`RelationalDatabaseBlueprintId`  <a name="cfn-lightsail-database-relationaldatabaseblueprintid"></a>
The blueprint ID for the database (for example, `mysql_8_0`).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`RelationalDatabaseBundleId`  <a name="cfn-lightsail-database-relationaldatabasebundleid"></a>
The bundle ID for the database (for example, `medium_1_0`).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

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

`RelationalDatabaseParameters`  <a name="cfn-lightsail-database-relationaldatabaseparameters"></a>
An array of parameters for the database.  
*Required*: No  
*Type*: Array of [RelationalDatabaseParameter](aws-properties-lightsail-database-relationaldatabaseparameter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RotateMasterUserPassword`  <a name="cfn-lightsail-database-rotatemasteruserpassword"></a>
A Boolean value indicating whether to change the primary user password to a new, strong password generated by Lightsail.  
The `RotateMasterUserPassword` and `MasterUserPassword` parameters cannot be used together in the same template.
*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)

`Tags`  <a name="cfn-lightsail-database-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-database-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-database-return-values"></a>

### Ref
<a name="aws-resource-lightsail-database-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-database-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-database-return-values-fn--getatt-fn--getatt"></a>

`DatabaseArn`  <a name="DatabaseArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the database (for example, `arn:aws:lightsail:us-east-2:123456789101:RelationalDatabase/244ad76f-8aad-4741-809f-12345EXAMPLE`).

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

 *Availability Zone* 

You can specify an Availability Zone when you perform a create database request. If you don’t specify one, the database is created in the same Availability Zone as the last Lightsail resource you created.

 *Database updates* 

All database update operations are performed immediately. However, parameter updates are applied based on the `ApplyMethod` value for the specific parameter being updated.

# AWS::Lightsail::Database RelationalDatabaseParameter
<a name="aws-properties-lightsail-database-relationaldatabaseparameter"></a>

`RelationalDatabaseParameter` is a property of the [AWS::Lightsail::Database](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-database.html) resource. It describes parameters for the database.

## Syntax
<a name="aws-properties-lightsail-database-relationaldatabaseparameter-syntax"></a>

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

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

```
{
  "[AllowedValues](#cfn-lightsail-database-relationaldatabaseparameter-allowedvalues)" : String,
  "[ApplyMethod](#cfn-lightsail-database-relationaldatabaseparameter-applymethod)" : String,
  "[ApplyType](#cfn-lightsail-database-relationaldatabaseparameter-applytype)" : String,
  "[DataType](#cfn-lightsail-database-relationaldatabaseparameter-datatype)" : String,
  "[Description](#cfn-lightsail-database-relationaldatabaseparameter-description)" : String,
  "[IsModifiable](#cfn-lightsail-database-relationaldatabaseparameter-ismodifiable)" : Boolean,
  "[ParameterName](#cfn-lightsail-database-relationaldatabaseparameter-parametername)" : String,
  "[ParameterValue](#cfn-lightsail-database-relationaldatabaseparameter-parametervalue)" : String
}
```

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

```
  [AllowedValues](#cfn-lightsail-database-relationaldatabaseparameter-allowedvalues): String
  [ApplyMethod](#cfn-lightsail-database-relationaldatabaseparameter-applymethod): String
  [ApplyType](#cfn-lightsail-database-relationaldatabaseparameter-applytype): String
  [DataType](#cfn-lightsail-database-relationaldatabaseparameter-datatype): String
  [Description](#cfn-lightsail-database-relationaldatabaseparameter-description): String
  [IsModifiable](#cfn-lightsail-database-relationaldatabaseparameter-ismodifiable): Boolean
  [ParameterName](#cfn-lightsail-database-relationaldatabaseparameter-parametername): String
  [ParameterValue](#cfn-lightsail-database-relationaldatabaseparameter-parametervalue): String
```

## Properties
<a name="aws-properties-lightsail-database-relationaldatabaseparameter-properties"></a>

`AllowedValues`  <a name="cfn-lightsail-database-relationaldatabaseparameter-allowedvalues"></a>
The valid range of values for the parameter.  
*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)

`ApplyMethod`  <a name="cfn-lightsail-database-relationaldatabaseparameter-applymethod"></a>
Indicates when parameter updates are applied.  
Can be `immediate` or `pending-reboot`.  
*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)

`ApplyType`  <a name="cfn-lightsail-database-relationaldatabaseparameter-applytype"></a>
Specifies the engine-specific parameter type.  
*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)

`DataType`  <a name="cfn-lightsail-database-relationaldatabaseparameter-datatype"></a>
The valid data type of the parameter.  
*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)

`Description`  <a name="cfn-lightsail-database-relationaldatabaseparameter-description"></a>
A description of the parameter.  
*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)

`IsModifiable`  <a name="cfn-lightsail-database-relationaldatabaseparameter-ismodifiable"></a>
A Boolean value indicating whether the parameter can be modified.  
*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)

`ParameterName`  <a name="cfn-lightsail-database-relationaldatabaseparameter-parametername"></a>
The name of the parameter.  
*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)

`ParameterValue`  <a name="cfn-lightsail-database-relationaldatabaseparameter-parametervalue"></a>
The value for the parameter.  
*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::Database Tag
<a name="aws-properties-lightsail-database-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-database-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-database-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-database-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)

# AWS::Lightsail::DatabaseSnapshot
<a name="aws-resource-lightsail-databasesnapshot"></a>

Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database.

The `create relational database snapshot` operation supports tag-based access control via request tags. For more information, see the [Amazon Lightsail Developer Guide](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-controlling-access-using-tags).

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

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

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

```
{
  "Type" : "AWS::Lightsail::DatabaseSnapshot",
  "Properties" : {
      "[RelationalDatabaseName](#cfn-lightsail-databasesnapshot-relationaldatabasename)" : String,
      "[RelationalDatabaseSnapshotName](#cfn-lightsail-databasesnapshot-relationaldatabasesnapshotname)" : String,
      "[Tags](#cfn-lightsail-databasesnapshot-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::DatabaseSnapshot
Properties:
  [RelationalDatabaseName](#cfn-lightsail-databasesnapshot-relationaldatabasename): String
  [RelationalDatabaseSnapshotName](#cfn-lightsail-databasesnapshot-relationaldatabasesnapshotname): String
  [Tags](#cfn-lightsail-databasesnapshot-tags): 
    - Tag
```

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

`RelationalDatabaseName`  <a name="cfn-lightsail-databasesnapshot-relationaldatabasename"></a>
The unique name of the database resource in Lightsail.  
*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)

`RelationalDatabaseSnapshotName`  <a name="cfn-lightsail-databasesnapshot-relationaldatabasesnapshotname"></a>
The name of the database snapshot.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\w[\w\-]*\w$`  
*Minimum*: `2`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lightsail-databasesnapshot-tags"></a>
The tag keys and optional values for the 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).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-databasesnapshot-tag.md)  
*Maximum*: `50`  
*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-databasesnapshot-return-values"></a>

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

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

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

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

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The timestamp when the database snapshot was created.

`Engine`  <a name="Engine-fn::getatt"></a>
The software of the database snapshot (for example, `MySQL`)

`EngineVersion`  <a name="EngineVersion-fn::getatt"></a>
The database engine version for the database snapshot (for example, `5.7.23`).

`FromRelationalDatabaseArn`  <a name="FromRelationalDatabaseArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the database from which the database snapshot was created.

`FromRelationalDatabaseBlueprintId`  <a name="FromRelationalDatabaseBlueprintId-fn::getatt"></a>
The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database.

`FromRelationalDatabaseBundleId`  <a name="FromRelationalDatabaseBundleId-fn::getatt"></a>
The bundle ID of the database from which the database snapshot was created.

`FromRelationalDatabaseName`  <a name="FromRelationalDatabaseName-fn::getatt"></a>
The name of the source database from which the database snapshot was created.

`Name`  <a name="Name-fn::getatt"></a>
The name of the database snapshot.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The Lightsail resource type.

`SizeInGb`  <a name="SizeInGb-fn::getatt"></a>
The size of the disk in GB (for example, `32`) for the database snapshot.

`State`  <a name="State-fn::getatt"></a>
The state of the database snapshot.

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily.

# AWS::Lightsail::DatabaseSnapshot Location
<a name="aws-properties-lightsail-databasesnapshot-location"></a>

<a name="aws-properties-lightsail-databasesnapshot-location-description"></a>The `Location` property type specifies Property description not available. for an [AWS::Lightsail::DatabaseSnapshot](aws-resource-lightsail-databasesnapshot.md).

## Syntax
<a name="aws-properties-lightsail-databasesnapshot-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-databasesnapshot-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-databasesnapshot-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-databasesnapshot-location-availabilityzone): String
  [RegionName](#cfn-lightsail-databasesnapshot-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-databasesnapshot-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-databasesnapshot-location-availabilityzone"></a>
Property description not available.  
*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)

`RegionName`  <a name="cfn-lightsail-databasesnapshot-location-regionname"></a>
Property description not available.  
*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::DatabaseSnapshot Tag
<a name="aws-properties-lightsail-databasesnapshot-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-databasesnapshot-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-databasesnapshot-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-databasesnapshot-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)

# AWS::Lightsail::Disk
<a name="aws-resource-lightsail-disk"></a>

The `AWS::Lightsail::Disk` resource specifies a disk that can be attached to an Amazon Lightsail instance that is in the same AWS Region and Availability Zone.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Disk",
  "Properties" : {
      "[AddOns](#cfn-lightsail-disk-addons)" : [ AddOn, ... ],
      "[AvailabilityZone](#cfn-lightsail-disk-availabilityzone)" : String,
      "[DiskName](#cfn-lightsail-disk-diskname)" : String,
      "[Location](#cfn-lightsail-disk-location)" : Location,
      "[SizeInGb](#cfn-lightsail-disk-sizeingb)" : Integer,
      "[Tags](#cfn-lightsail-disk-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Disk
Properties:
  [AddOns](#cfn-lightsail-disk-addons): 
    - AddOn
  [AvailabilityZone](#cfn-lightsail-disk-availabilityzone): String
  [DiskName](#cfn-lightsail-disk-diskname): String
  [Location](#cfn-lightsail-disk-location): 
    Location
  [SizeInGb](#cfn-lightsail-disk-sizeingb): Integer
  [Tags](#cfn-lightsail-disk-tags): 
    - Tag
```

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

`AddOns`  <a name="cfn-lightsail-disk-addons"></a>
An array of add-ons for the disk.  
If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.
*Required*: No  
*Type*: Array of [AddOn](aws-properties-lightsail-disk-addon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AvailabilityZone`  <a name="cfn-lightsail-disk-availabilityzone"></a>
The AWS Region and Availability Zone location for the disk (for example, `us-east-1a`).  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`DiskName`  <a name="cfn-lightsail-disk-diskname"></a>
The name of the disk.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9][\w\-.]*[a-zA-Z0-9]$`  
*Minimum*: `1`  
*Maximum*: `254`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Location`  <a name="cfn-lightsail-disk-location"></a>
The AWS Region and Availability Zone where the disk is located.  
*Required*: No  
*Type*: [Location](aws-properties-lightsail-disk-location.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SizeInGb`  <a name="cfn-lightsail-disk-sizeingb"></a>
The size of the disk in GB.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: Updates are not supported.

`Tags`  <a name="cfn-lightsail-disk-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-disk-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-disk-return-values"></a>

### Ref
<a name="aws-resource-lightsail-disk-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-disk-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-disk-return-values-fn--getatt-fn--getatt"></a>

`AttachedTo`  <a name="AttachedTo-fn::getatt"></a>
The resources to which the disk is attached.

`AttachmentState`  <a name="AttachmentState-fn::getatt"></a>
(Deprecated) The attachment state of the disk.  
In releases prior to November 14, 2017, this parameter returned `attached` for system disks in the API response. It is now deprecated, but still included in the response. Use `isAttached` instead.

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

`Iops`  <a name="Iops-fn::getatt"></a>
The input/output operations per second (IOPS) of the disk.

`IsAttached`  <a name="IsAttached-fn::getatt"></a>
A Boolean value indicating whether the disk is attached.

`Location.AvailabilityZone`  <a name="Location.AvailabilityZone-fn::getatt"></a>
The Availability Zone where the disk is located.

`Location.RegionName`  <a name="Location.RegionName-fn::getatt"></a>
The AWS Region where the disk is located.

`Path`  <a name="Path-fn::getatt"></a>
The disk path.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The resource type of the disk (for example, `Disk`).

`State`  <a name="State-fn::getatt"></a>
The state of the disk (for example, `in-use`).

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code of the disk.  
Include this code in your email to support when you have questions about a disk or another resource in Lightsail. This code helps our support team to look up your Lightsail information.

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

 *Availability Zone* 

You can specify an Availability Zone when you perform a create disk request. If you don’t specify one, the disk is created in the same Availability Zone as the last Lightsail resource you created.

 *Disk state* 

Disks can be deleted only when they're in an `available` state. If the disk is in an `attached` state when performing a delete disk request, the service will wait to check if the disk state changes to `available`. The delete disk request times out if the disk state doesn't change to `available` within 15 minutes.

# AWS::Lightsail::Disk AddOn
<a name="aws-properties-lightsail-disk-addon"></a>

`AddOn` is a property of the [AWS::Lightsail::Disk](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-disk.html) resource. It describes the add-ons for a disk.

## Syntax
<a name="aws-properties-lightsail-disk-addon-syntax"></a>

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

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

```
{
  "[AddOnType](#cfn-lightsail-disk-addon-addontype)" : String,
  "[AutoSnapshotAddOnRequest](#cfn-lightsail-disk-addon-autosnapshotaddonrequest)" : AutoSnapshotAddOn,
  "[Status](#cfn-lightsail-disk-addon-status)" : String
}
```

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

```
  [AddOnType](#cfn-lightsail-disk-addon-addontype): String
  [AutoSnapshotAddOnRequest](#cfn-lightsail-disk-addon-autosnapshotaddonrequest): 
    AutoSnapshotAddOn
  [Status](#cfn-lightsail-disk-addon-status): String
```

## Properties
<a name="aws-properties-lightsail-disk-addon-properties"></a>

`AddOnType`  <a name="cfn-lightsail-disk-addon-addontype"></a>
The add-on type (for example, `AutoSnapshot`).  
`AutoSnapshot` is the only add-on that can be enabled for a disk.
*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)

`AutoSnapshotAddOnRequest`  <a name="cfn-lightsail-disk-addon-autosnapshotaddonrequest"></a>
The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.  
*Required*: No  
*Type*: [AutoSnapshotAddOn](aws-properties-lightsail-disk-autosnapshotaddon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-lightsail-disk-addon-status"></a>
The status of the add-on.  
Valid Values: `Enabled` \$1 `Disabled`  
*Required*: No  
*Type*: String  
*Allowed values*: `Enabling | Disabling | Enabled | Terminating | Terminated | Disabled | Failed`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Disk AutoSnapshotAddOn
<a name="aws-properties-lightsail-disk-autosnapshotaddon"></a>

`AutoSnapshotAddOn` is a property of the [AddOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-disk-addon.html) property. It describes the automatic snapshot add-on for a disk.

## Syntax
<a name="aws-properties-lightsail-disk-autosnapshotaddon-syntax"></a>

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

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

```
{
  "[SnapshotTimeOfDay](#cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday)" : String
}
```

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

```
  [SnapshotTimeOfDay](#cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday): String
```

## Properties
<a name="aws-properties-lightsail-disk-autosnapshotaddon-properties"></a>

`SnapshotTimeOfDay`  <a name="cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday"></a>
The daily time when an automatic snapshot will be created.  
Constraints:  
+ Must be in `HH:00` format, and in an hourly increment.
+ Specified in Coordinated Universal Time (UTC).
+ The snapshot will be automatically created between the time specified and up to 45 minutes after.
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9]{2}:00$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Disk Location
<a name="aws-properties-lightsail-disk-location"></a>

The AWS Region and Availability Zone where the disk is located.

## Syntax
<a name="aws-properties-lightsail-disk-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-disk-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-disk-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-disk-location-availabilityzone): String
  [RegionName](#cfn-lightsail-disk-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-disk-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-disk-location-availabilityzone"></a>
The Availability Zone where the disk is located.  
*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)

`RegionName`  <a name="cfn-lightsail-disk-location-regionname"></a>
The AWS Region where the disk is located.  
*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::Disk Tag
<a name="aws-properties-lightsail-disk-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-disk-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-disk-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-disk-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)

# AWS::Lightsail::DiskSnapshot
<a name="aws-resource-lightsail-disksnapshot"></a>

Describes a block storage disk snapshot.

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

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

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

```
{
  "Type" : "AWS::Lightsail::DiskSnapshot",
  "Properties" : {
      "[DiskName](#cfn-lightsail-disksnapshot-diskname)" : String,
      "[DiskSnapshotName](#cfn-lightsail-disksnapshot-disksnapshotname)" : String,
      "[Tags](#cfn-lightsail-disksnapshot-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::DiskSnapshot
Properties:
  [DiskName](#cfn-lightsail-disksnapshot-diskname): String
  [DiskSnapshotName](#cfn-lightsail-disksnapshot-disksnapshotname): String
  [Tags](#cfn-lightsail-disksnapshot-tags): 
    - Tag
```

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

`DiskName`  <a name="cfn-lightsail-disksnapshot-diskname"></a>
The unique name of the disk.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\w[\w\-]*\w$`  
*Minimum*: `2`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DiskSnapshotName`  <a name="cfn-lightsail-disksnapshot-disksnapshotname"></a>
The name of the disk snapshot (`my-disk-snapshot`).  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\w[\w\-]*\w$`  
*Minimum*: `2`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lightsail-disksnapshot-tags"></a>
The tag keys and optional values for the 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).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-disksnapshot-tag.md)  
*Maximum*: `50`  
*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-disksnapshot-return-values"></a>

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

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

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

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The date when the disk snapshot was created.

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

`FromDiskName`  <a name="FromDiskName-fn::getatt"></a>
The unique name of the source disk from which the disk snapshot was created.

`IsFromAutoSnapshot`  <a name="IsFromAutoSnapshot-fn::getatt"></a>
A Boolean value indicating whether the snapshot was created from an automatic snapshot.

`Progress`  <a name="Progress-fn::getatt"></a>
The progress of the snapshot.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The Lightsail resource type (`DiskSnapshot`).

`SizeInGb`  <a name="SizeInGb-fn::getatt"></a>
The size of the disk in GB.

`State`  <a name="State-fn::getatt"></a>
The status of the disk snapshot operation.

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

# AWS::Lightsail::DiskSnapshot Location
<a name="aws-properties-lightsail-disksnapshot-location"></a>

<a name="aws-properties-lightsail-disksnapshot-location-description"></a>The `Location` property type specifies Property description not available. for an [AWS::Lightsail::DiskSnapshot](aws-resource-lightsail-disksnapshot.md).

## Syntax
<a name="aws-properties-lightsail-disksnapshot-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-disksnapshot-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-disksnapshot-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-disksnapshot-location-availabilityzone): String
  [RegionName](#cfn-lightsail-disksnapshot-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-disksnapshot-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-disksnapshot-location-availabilityzone"></a>
Property description not available.  
*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)

`RegionName`  <a name="cfn-lightsail-disksnapshot-location-regionname"></a>
Property description not available.  
*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::DiskSnapshot Tag
<a name="aws-properties-lightsail-disksnapshot-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-disksnapshot-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-disksnapshot-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-disksnapshot-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)

# 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)

# AWS::Lightsail::Domain
<a name="aws-resource-lightsail-domain"></a>

Describes a domain where you are storing recordsets.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Domain",
  "Properties" : {
      "[DomainEntries](#cfn-lightsail-domain-domainentries)" : [ DomainEntry, ... ],
      "[DomainName](#cfn-lightsail-domain-domainname)" : String,
      "[Tags](#cfn-lightsail-domain-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::Domain
Properties:
  [DomainEntries](#cfn-lightsail-domain-domainentries): 
    - DomainEntry
  [DomainName](#cfn-lightsail-domain-domainname): String
  [Tags](#cfn-lightsail-domain-tags): 
    - Tag
```

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

`DomainEntries`  <a name="cfn-lightsail-domain-domainentries"></a>
An array of key-value pairs containing information about the domain entries.  
*Required*: No  
*Type*: Array of [DomainEntry](aws-properties-lightsail-domain-domainentry.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainName`  <a name="cfn-lightsail-domain-domainname"></a>
The fully qualified domain name in the certificate request.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-lightsail-domain-tags"></a>
The tag keys and optional values for the 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).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-domain-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-domain-return-values"></a>

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

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

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

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the domain recordset (`arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE`).

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The date when the domain recordset was created.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The resource type. 

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

# AWS::Lightsail::Domain DomainEntry
<a name="aws-properties-lightsail-domain-domainentry"></a>

Describes a domain recordset entry.

## Syntax
<a name="aws-properties-lightsail-domain-domainentry-syntax"></a>

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

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

```
{
  "[Id](#cfn-lightsail-domain-domainentry-id)" : String,
  "[IsAlias](#cfn-lightsail-domain-domainentry-isalias)" : Boolean,
  "[Name](#cfn-lightsail-domain-domainentry-name)" : String,
  "[Target](#cfn-lightsail-domain-domainentry-target)" : String,
  "[Type](#cfn-lightsail-domain-domainentry-type)" : String
}
```

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

```
  [Id](#cfn-lightsail-domain-domainentry-id): String
  [IsAlias](#cfn-lightsail-domain-domainentry-isalias): Boolean
  [Name](#cfn-lightsail-domain-domainentry-name): String
  [Target](#cfn-lightsail-domain-domainentry-target): String
  [Type](#cfn-lightsail-domain-domainentry-type): String
```

## Properties
<a name="aws-properties-lightsail-domain-domainentry-properties"></a>

`Id`  <a name="cfn-lightsail-domain-domainentry-id"></a>
The ID of the domain recordset entry.  
*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)

`IsAlias`  <a name="cfn-lightsail-domain-domainentry-isalias"></a>
When `true`, specifies whether the domain entry is an alias used by the Lightsail load balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another AWS resource. You can include an alias (A type) record in your request, which points to the DNS name of a load balancer, container service, CDN distribution, or other AWS resource and routes traffic to that resource.  
*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)

`Name`  <a name="cfn-lightsail-domain-domainentry-name"></a>
The name of the domain.  
*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)

`Target`  <a name="cfn-lightsail-domain-domainentry-target"></a>
The target IP address (`192.0.2.0`), or AWS name server (`ns-111.awsdns-22.com.`).  
For Lightsail load balancers, the value looks like `ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com`. For Lightsail distributions, the value looks like `exampled1182ne.cloudfront.net`. For Lightsail container services, the value looks like `container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com`. Be sure to also set `isAlias` to `true` when setting up an A record for a Lightsail load balancer, distribution, or container service.  
*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)

`Type`  <a name="cfn-lightsail-domain-domainentry-type"></a>
The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).  
The following domain entry types can be used:  
+  `A` 
+  `AAAA` 
+  `CNAME` 
+  `MX` 
+  `NS` 
+  `SOA` 
+  `SRV` 
+  `TXT` 
*Required*: Yes  
*Type*: String  
*Allowed values*: `A | AAAA | CNAME | MX | NS | SOA | SRV | TXT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Domain Location
<a name="aws-properties-lightsail-domain-location"></a>

<a name="aws-properties-lightsail-domain-location-description"></a>The `Location` property type specifies Property description not available. for an [AWS::Lightsail::Domain](aws-resource-lightsail-domain.md).

## Syntax
<a name="aws-properties-lightsail-domain-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-domain-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-domain-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-domain-location-availabilityzone): String
  [RegionName](#cfn-lightsail-domain-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-domain-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-domain-location-availabilityzone"></a>
Property description not available.  
*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)

`RegionName`  <a name="cfn-lightsail-domain-location-regionname"></a>
Property description not available.  
*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::Domain Tag
<a name="aws-properties-lightsail-domain-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-domain-tag-syntax"></a>

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

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

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

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

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

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

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

# AWS::Lightsail::Instance
<a name="aws-resource-lightsail-instance"></a>

The `AWS::Lightsail::Instance` resource specifies an Amazon Lightsail instance.

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

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

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

```
{
  "Type" : "AWS::Lightsail::Instance",
  "Properties" : {
      "[AddOns](#cfn-lightsail-instance-addons)" : [ AddOn, ... ],
      "[AvailabilityZone](#cfn-lightsail-instance-availabilityzone)" : String,
      "[BlueprintId](#cfn-lightsail-instance-blueprintid)" : String,
      "[BundleId](#cfn-lightsail-instance-bundleid)" : String,
      "[Hardware](#cfn-lightsail-instance-hardware)" : Hardware,
      "[InstanceName](#cfn-lightsail-instance-instancename)" : String,
      "[KeyPairName](#cfn-lightsail-instance-keypairname)" : String,
      "[Location](#cfn-lightsail-instance-location)" : Location,
      "[Networking](#cfn-lightsail-instance-networking)" : Networking,
      "[State](#cfn-lightsail-instance-state)" : State,
      "[Tags](#cfn-lightsail-instance-tags)" : [ Tag, ... ],
      "[UserData](#cfn-lightsail-instance-userdata)" : String
    }
}
```

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

```
Type: AWS::Lightsail::Instance
Properties:
  [AddOns](#cfn-lightsail-instance-addons): 
    - AddOn
  [AvailabilityZone](#cfn-lightsail-instance-availabilityzone): String
  [BlueprintId](#cfn-lightsail-instance-blueprintid): String
  [BundleId](#cfn-lightsail-instance-bundleid): String
  [Hardware](#cfn-lightsail-instance-hardware): 
    Hardware
  [InstanceName](#cfn-lightsail-instance-instancename): String
  [KeyPairName](#cfn-lightsail-instance-keypairname): String
  [Location](#cfn-lightsail-instance-location): 
    Location
  [Networking](#cfn-lightsail-instance-networking): 
    Networking
  [State](#cfn-lightsail-instance-state): 
    State
  [Tags](#cfn-lightsail-instance-tags): 
    - Tag
  [UserData](#cfn-lightsail-instance-userdata): String
```

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

`AddOns`  <a name="cfn-lightsail-instance-addons"></a>
An array of add-ons for the instance.  
If the instance has an add-on enabled when performing a delete instance request, the add-on is automatically disabled before the instance is deleted.
*Required*: No  
*Type*: Array of [AddOn](aws-properties-lightsail-instance-addon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AvailabilityZone`  <a name="cfn-lightsail-instance-availabilityzone"></a>
The Availability Zone for the instance.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`BlueprintId`  <a name="cfn-lightsail-instance-blueprintid"></a>
The blueprint ID for the instance (for example, `os_amlinux_2016_03`).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`BundleId`  <a name="cfn-lightsail-instance-bundleid"></a>
The bundle ID for the instance (for example, `micro_1_0`).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: Updates are not supported.

`Hardware`  <a name="cfn-lightsail-instance-hardware"></a>
The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.  
The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.
*Required*: No  
*Type*: [Hardware](aws-properties-lightsail-instance-hardware.md)  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`InstanceName`  <a name="cfn-lightsail-instance-instancename"></a>
The name of the instance.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9][\w\-.]*[a-zA-Z0-9]$`  
*Minimum*: `1`  
*Maximum*: `254`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KeyPairName`  <a name="cfn-lightsail-instance-keypairname"></a>
The name of the key pair to use for the instance.  
If no key pair name is specified, the Regional Lightsail default key pair is used.  
*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)

`Location`  <a name="cfn-lightsail-instance-location"></a>
The location for the instance, such as the AWS Region and Availability Zone.  
The `Location` property is read-only and should not be specified in a create instance or update instance request.
*Required*: No  
*Type*: [Location](aws-properties-lightsail-instance-location.md)  
*Update requires*: Updates are not supported.

`Networking`  <a name="cfn-lightsail-instance-networking"></a>
The public ports and the monthly amount of data transfer allocated for the instance.  
*Required*: No  
*Type*: [Networking](aws-properties-lightsail-instance-networking.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`State`  <a name="cfn-lightsail-instance-state"></a>
The status code and the state (for example, `running`) of the instance.  
The `State` property is read-only and should not be specified in a create instance or update instance request.
*Required*: No  
*Type*: [State](aws-properties-lightsail-instance-state.md)  
*Update requires*: Updates are not supported.

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

`UserData`  <a name="cfn-lightsail-instance-userdata"></a>
The optional launch script for the instance.  
Specify a launch script to configure an instance with additional user data. For example, you might want to specify `apt-get -y update` as a launch script.  
Depending on the blueprint of your instance, the command to get software on your instance varies. Amazon Linux and CentOS use `yum`, Debian and Ubuntu use `apt-get`, and FreeBSD uses `pkg`.
*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)

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

### Ref
<a name="aws-resource-lightsail-instance-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-instance-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-instance-return-values-fn--getatt-fn--getatt"></a>

`Hardware.CpuCount`  <a name="Hardware.CpuCount-fn::getatt"></a>
The number of vCPUs the instance has.

`Hardware.RamSizeInGb`  <a name="Hardware.RamSizeInGb-fn::getatt"></a>
The amount of RAM in GB on the instance (for example, `1.0`).

`InstanceArn`  <a name="InstanceArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the instance (for example, `arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE`).

`Ipv6Addresses`  <a name="Ipv6Addresses-fn::getatt"></a>
The IPv6 addresses of the instance.

`IsStaticIp`  <a name="IsStaticIp-fn::getatt"></a>
A Boolean value indicating whether the instance has a static IP assigned to it.

`Location.AvailabilityZone`  <a name="Location.AvailabilityZone-fn::getatt"></a>
The AWS Region and Availability Zone where the instance is located.

`Location.RegionName`  <a name="Location.RegionName-fn::getatt"></a>
The AWS Region of the instance.

`Networking.MonthlyTransfer.GbPerMonthAllocated`  <a name="Networking.MonthlyTransfer.GbPerMonthAllocated-fn::getatt"></a>
The amount of allocated monthly data transfer (in GB) for an instance.

`PrivateIpAddress`  <a name="PrivateIpAddress-fn::getatt"></a>
The private IP address of the instance.

`PublicIpAddress`  <a name="PublicIpAddress-fn::getatt"></a>
The public IP address of the instance.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The resource type of the instance (for example, `Instance`).

`SshKeyName`  <a name="SshKeyName-fn::getatt"></a>
The name of the SSH key pair used by the instance.

`State.Code`  <a name="State.Code-fn::getatt"></a>
The status code of the instance.

`State.Name`  <a name="State.Name-fn::getatt"></a>
The state of the instance (for example, `running` or `pending`).

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code of the instance.  
Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code helps our support team to look up your Lightsail information.

`UserName`  <a name="UserName-fn::getatt"></a>
The user name for connecting to the instance (for example, `ec2-user`).

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

 *Attaching a static IP to an instance* 

You cannot attach a static IP to an instance using the instance resource. Instead, you must use the static IP resource to attach a static IP to an instance. To attach a static IP to an instance, the instance must be in a `running` state.

 *Network ports* 

If no network ports are specified when performing a create instance request, the default network ports are opened when the instance is created.

To open ports on your instance when performing a create instance request, you must specify all the ports that you want to open, including the default ports. The default ports are not automatically opened when you specify the ports you want to open.

 *Disk attach and detach* 

The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.

If you detach a disk (for eample, `DiskA`) and attach a different disk (for example, `DiskB`) in the same request, and the attach disk request fails, CloudFormation will attempt to roll back the changes so that `DiskA` is re-attached to the instance. However, if you delete `DiskA` before CloudFormation attemps the roll-back, then the roll-back will fail and the instance will not have either disk attached.

 *Read-only properties* 

The `State`, `Location`, `CpuCount`, and `RamSizeInGb` properties are read-only and should not be specified in a create instance or update instance request.

# AWS::Lightsail::Instance AddOn
<a name="aws-properties-lightsail-instance-addon"></a>

`AddOn` is a property of the [AWS::Lightsail::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html) resource. It describes the add-ons for an instance.

## Syntax
<a name="aws-properties-lightsail-instance-addon-syntax"></a>

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

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

```
{
  "[AddOnType](#cfn-lightsail-instance-addon-addontype)" : String,
  "[AutoSnapshotAddOnRequest](#cfn-lightsail-instance-addon-autosnapshotaddonrequest)" : AutoSnapshotAddOn,
  "[Status](#cfn-lightsail-instance-addon-status)" : String
}
```

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

```
  [AddOnType](#cfn-lightsail-instance-addon-addontype): String
  [AutoSnapshotAddOnRequest](#cfn-lightsail-instance-addon-autosnapshotaddonrequest): 
    AutoSnapshotAddOn
  [Status](#cfn-lightsail-instance-addon-status): String
```

## Properties
<a name="aws-properties-lightsail-instance-addon-properties"></a>

`AddOnType`  <a name="cfn-lightsail-instance-addon-addontype"></a>
The add-on type (for example, `AutoSnapshot`).  
`AutoSnapshot` is the only add-on that can be enabled for an instance.
*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)

`AutoSnapshotAddOnRequest`  <a name="cfn-lightsail-instance-addon-autosnapshotaddonrequest"></a>
The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.  
*Required*: No  
*Type*: [AutoSnapshotAddOn](aws-properties-lightsail-instance-autosnapshotaddon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-lightsail-instance-addon-status"></a>
The status of the add-on.  
Valid Values: `Enabled` \$1 `Disabled`  
*Required*: No  
*Type*: String  
*Allowed values*: `Enabling | Disabling | Enabled | Terminating | Terminated | Disabled | Failed`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Instance AutoSnapshotAddOn
<a name="aws-properties-lightsail-instance-autosnapshotaddon"></a>

`AutoSnapshotAddOn` is a property of the [AddOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html) property. It describes the automatic snapshot add-on for an instance.

## Syntax
<a name="aws-properties-lightsail-instance-autosnapshotaddon-syntax"></a>

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

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

```
{
  "[SnapshotTimeOfDay](#cfn-lightsail-instance-autosnapshotaddon-snapshottimeofday)" : String
}
```

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

```
  [SnapshotTimeOfDay](#cfn-lightsail-instance-autosnapshotaddon-snapshottimeofday): String
```

## Properties
<a name="aws-properties-lightsail-instance-autosnapshotaddon-properties"></a>

`SnapshotTimeOfDay`  <a name="cfn-lightsail-instance-autosnapshotaddon-snapshottimeofday"></a>
The daily time when an automatic snapshot will be created.  
Constraints:  
+ Must be in `HH:00` format, and in an hourly increment.
+ Specified in Coordinated Universal Time (UTC).
+ The snapshot will be automatically created between the time specified and up to 45 minutes after.
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9]{2}:00$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Instance Disk
<a name="aws-properties-lightsail-instance-disk"></a>

`Disk` is a property of the [Hardware](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html) property. It describes a disk attached to an instance.

## Syntax
<a name="aws-properties-lightsail-instance-disk-syntax"></a>

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

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

```
{
  "[AttachedTo](#cfn-lightsail-instance-disk-attachedto)" : String,
  "[AttachmentState](#cfn-lightsail-instance-disk-attachmentstate)" : String,
  "[DiskName](#cfn-lightsail-instance-disk-diskname)" : String,
  "[IOPS](#cfn-lightsail-instance-disk-iops)" : Integer,
  "[IsSystemDisk](#cfn-lightsail-instance-disk-issystemdisk)" : Boolean,
  "[Path](#cfn-lightsail-instance-disk-path)" : String,
  "[SizeInGb](#cfn-lightsail-instance-disk-sizeingb)" : String
}
```

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

```
  [AttachedTo](#cfn-lightsail-instance-disk-attachedto): String
  [AttachmentState](#cfn-lightsail-instance-disk-attachmentstate): String
  [DiskName](#cfn-lightsail-instance-disk-diskname): String
  [IOPS](#cfn-lightsail-instance-disk-iops): Integer
  [IsSystemDisk](#cfn-lightsail-instance-disk-issystemdisk): Boolean
  [Path](#cfn-lightsail-instance-disk-path): String
  [SizeInGb](#cfn-lightsail-instance-disk-sizeingb): String
```

## Properties
<a name="aws-properties-lightsail-instance-disk-properties"></a>

`AttachedTo`  <a name="cfn-lightsail-instance-disk-attachedto"></a>
The resources to which the disk is attached.  
*Required*: No  
*Type*: String  
*Update requires*: Updates are not supported.

`AttachmentState`  <a name="cfn-lightsail-instance-disk-attachmentstate"></a>
(Deprecated) The attachment state of the disk.  
In releases prior to November 14, 2017, this parameter returned `attached` for system disks in the API response. It is now deprecated, but still included in the response. Use `isAttached` instead.
*Required*: No  
*Type*: String  
*Update requires*: Updates are not supported.

`DiskName`  <a name="cfn-lightsail-instance-disk-diskname"></a>
The unique name of the disk.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9][\w\-.]*[a-zA-Z0-9]$`  
*Minimum*: `1`  
*Maximum*: `254`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IOPS`  <a name="cfn-lightsail-instance-disk-iops"></a>
The input/output operations per second (IOPS) of the disk.  
*Required*: No  
*Type*: Integer  
*Update requires*: Updates are not supported.

`IsSystemDisk`  <a name="cfn-lightsail-instance-disk-issystemdisk"></a>
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).  
*Required*: No  
*Type*: Boolean  
*Update requires*: Updates are not supported.

`Path`  <a name="cfn-lightsail-instance-disk-path"></a>
The disk path.  
*Required*: Yes  
*Type*: String  
*Update requires*: Updates are not supported.

`SizeInGb`  <a name="cfn-lightsail-instance-disk-sizeingb"></a>
The size of the disk in GB.  
*Required*: No  
*Type*: String  
*Update requires*: Updates are not supported.

# AWS::Lightsail::Instance Hardware
<a name="aws-properties-lightsail-instance-hardware"></a>

`Hardware` is a property of the [AWS::Lightsail::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html) resource. It describes the hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.

## Syntax
<a name="aws-properties-lightsail-instance-hardware-syntax"></a>

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

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

```
{
  "[CpuCount](#cfn-lightsail-instance-hardware-cpucount)" : Integer,
  "[Disks](#cfn-lightsail-instance-hardware-disks)" : [ Disk, ... ],
  "[RamSizeInGb](#cfn-lightsail-instance-hardware-ramsizeingb)" : Integer
}
```

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

```
  [CpuCount](#cfn-lightsail-instance-hardware-cpucount): Integer
  [Disks](#cfn-lightsail-instance-hardware-disks): 
    - Disk
  [RamSizeInGb](#cfn-lightsail-instance-hardware-ramsizeingb): Integer
```

## Properties
<a name="aws-properties-lightsail-instance-hardware-properties"></a>

`CpuCount`  <a name="cfn-lightsail-instance-hardware-cpucount"></a>
The number of vCPUs the instance has.  
The `CpuCount` property is read-only and should not be specified in a create instance or update instance request.
*Required*: No  
*Type*: Integer  
*Update requires*: Updates are not supported.

`Disks`  <a name="cfn-lightsail-instance-hardware-disks"></a>
The disks attached to the instance.  
The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.  
*Required*: No  
*Type*: Array of [Disk](aws-properties-lightsail-instance-disk.md)  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`RamSizeInGb`  <a name="cfn-lightsail-instance-hardware-ramsizeingb"></a>
The amount of RAM in GB on the instance (for example, `1.0`).  
The `RamSizeInGb` property is read-only and should not be specified in a create instance or update instance request.
*Required*: No  
*Type*: Integer  
*Update requires*: Updates are not supported.

# AWS::Lightsail::Instance Location
<a name="aws-properties-lightsail-instance-location"></a>

`Location` is a property of the [AWS::Lightsail::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html) resource. It describes the location for an instance.

## Syntax
<a name="aws-properties-lightsail-instance-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-instance-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-instance-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-instance-location-availabilityzone): String
  [RegionName](#cfn-lightsail-instance-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-instance-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-instance-location-availabilityzone"></a>
The Availability Zone for the instance.  
*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)

`RegionName`  <a name="cfn-lightsail-instance-location-regionname"></a>
The name of the AWS Region for the instance.  
*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::Instance MonthlyTransfer
<a name="aws-properties-lightsail-instance-monthlytransfer"></a>

`MonthlyTransfer` is a property of the [Networking](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.html) property. It describes the amount of allocated monthly data transfer (in GB) for an instance.

## Syntax
<a name="aws-properties-lightsail-instance-monthlytransfer-syntax"></a>

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

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

```
{
  "[GbPerMonthAllocated](#cfn-lightsail-instance-monthlytransfer-gbpermonthallocated)" : String
}
```

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

```
  [GbPerMonthAllocated](#cfn-lightsail-instance-monthlytransfer-gbpermonthallocated): String
```

## Properties
<a name="aws-properties-lightsail-instance-monthlytransfer-properties"></a>

`GbPerMonthAllocated`  <a name="cfn-lightsail-instance-monthlytransfer-gbpermonthallocated"></a>
The amount of allocated monthly data transfer (in GB) for an instance.  
*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::Instance Networking
<a name="aws-properties-lightsail-instance-networking"></a>

`Networking` is a property of the [AWS::Lightsail::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html) resource. It describes the public ports and the monthly amount of data transfer allocated for the instance.

## Syntax
<a name="aws-properties-lightsail-instance-networking-syntax"></a>

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

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

```
{
  "[MonthlyTransfer](#cfn-lightsail-instance-networking-monthlytransfer)" : MonthlyTransfer,
  "[Ports](#cfn-lightsail-instance-networking-ports)" : [ Port, ... ]
}
```

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

```
  [MonthlyTransfer](#cfn-lightsail-instance-networking-monthlytransfer): 
    MonthlyTransfer
  [Ports](#cfn-lightsail-instance-networking-ports): 
    - Port
```

## Properties
<a name="aws-properties-lightsail-instance-networking-properties"></a>

`MonthlyTransfer`  <a name="cfn-lightsail-instance-networking-monthlytransfer"></a>
The monthly amount of data transfer, in GB, allocated for the instance  
*Required*: No  
*Type*: [MonthlyTransfer](aws-properties-lightsail-instance-monthlytransfer.md)  
*Update requires*: Updates are not supported.

`Ports`  <a name="cfn-lightsail-instance-networking-ports"></a>
An array of ports to open on the instance.  
*Required*: Yes  
*Type*: Array of [Port](aws-properties-lightsail-instance-port.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Instance Port
<a name="aws-properties-lightsail-instance-port"></a>

`Port` is a property of the [Networking](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.html) property. It describes information about ports for an instance.

## Syntax
<a name="aws-properties-lightsail-instance-port-syntax"></a>

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

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

```
{
  "[AccessDirection](#cfn-lightsail-instance-port-accessdirection)" : String,
  "[AccessFrom](#cfn-lightsail-instance-port-accessfrom)" : String,
  "[AccessType](#cfn-lightsail-instance-port-accesstype)" : String,
  "[CidrListAliases](#cfn-lightsail-instance-port-cidrlistaliases)" : [ String, ... ],
  "[Cidrs](#cfn-lightsail-instance-port-cidrs)" : [ String, ... ],
  "[CommonName](#cfn-lightsail-instance-port-commonname)" : String,
  "[FromPort](#cfn-lightsail-instance-port-fromport)" : Integer,
  "[Ipv6Cidrs](#cfn-lightsail-instance-port-ipv6cidrs)" : [ String, ... ],
  "[Protocol](#cfn-lightsail-instance-port-protocol)" : String,
  "[ToPort](#cfn-lightsail-instance-port-toport)" : Integer
}
```

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

```
  [AccessDirection](#cfn-lightsail-instance-port-accessdirection): String
  [AccessFrom](#cfn-lightsail-instance-port-accessfrom): String
  [AccessType](#cfn-lightsail-instance-port-accesstype): String
  [CidrListAliases](#cfn-lightsail-instance-port-cidrlistaliases): 
    - String
  [Cidrs](#cfn-lightsail-instance-port-cidrs): 
    - String
  [CommonName](#cfn-lightsail-instance-port-commonname): String
  [FromPort](#cfn-lightsail-instance-port-fromport): Integer
  [Ipv6Cidrs](#cfn-lightsail-instance-port-ipv6cidrs): 
    - String
  [Protocol](#cfn-lightsail-instance-port-protocol): String
  [ToPort](#cfn-lightsail-instance-port-toport): Integer
```

## Properties
<a name="aws-properties-lightsail-instance-port-properties"></a>

`AccessDirection`  <a name="cfn-lightsail-instance-port-accessdirection"></a>
The access direction (`inbound` or `outbound`).  
Lightsail currently supports only `inbound` access direction.
*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)

`AccessFrom`  <a name="cfn-lightsail-instance-port-accessfrom"></a>
The location from which access is allowed. For example, `Anywhere (0.0.0.0/0)`, or `Custom` if a specific IP address or range of IP addresses is allowed.  
*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)

`AccessType`  <a name="cfn-lightsail-instance-port-accesstype"></a>
The type of access (`Public` or `Private`).  
*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)

`CidrListAliases`  <a name="cfn-lightsail-instance-port-cidrlistaliases"></a>
An alias that defines access for a preconfigured range of IP addresses.  
The only alias currently supported is `lightsail-connect`, which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.  
*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)

`Cidrs`  <a name="cfn-lightsail-instance-port-cidrs"></a>
The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.  
The `ipv6Cidrs` parameter lists the IPv6 addresses that are allowed to connect to an instance.
Examples:  
+ To allow the IP address `192.0.2.44`, specify `192.0.2.44` or `192.0.2.44/32`. 
+ To allow the IP addresses `192.0.2.0` to `192.0.2.255`, specify `192.0.2.0/24`.
*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)

`CommonName`  <a name="cfn-lightsail-instance-port-commonname"></a>
The common name of the port information.  
*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)

`FromPort`  <a name="cfn-lightsail-instance-port-fromport"></a>
The first port in a range of open ports on an instance.  
Allowed ports:  
+ TCP and UDP - `0` to `65535`
+ ICMP - The ICMP type for IPv4 addresses. For example, specify `8` as the `fromPort` (ICMP type), and `-1` as the `toPort` (ICMP code), to enable ICMP Ping.
+ ICMPv6 - The ICMP type for IPv6 addresses. For example, specify `128` as the `fromPort` (ICMPv6 type), and `0` as `toPort` (ICMPv6 code).
*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)

`Ipv6Cidrs`  <a name="cfn-lightsail-instance-port-ipv6cidrs"></a>
The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used.  
The `cidrs` parameter lists the IPv4 addresses that are allowed to connect to an instance.
*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)

`Protocol`  <a name="cfn-lightsail-instance-port-protocol"></a>
The IP protocol name.  
The name can be one of the following:  
+ `tcp` - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn't require reliable data stream service, use UDP instead.
+ `all` - All transport layer protocol types.
+ `udp` - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don't require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.
+ `icmp` - Internet Control Message Protocol (ICMP) is used to send error messages and operational information indicating success or failure when communicating with an instance. For example, an error is indicated when an instance could not be reached. When you specify `icmp` as the `protocol`, you must specify the ICMP type using the `fromPort` parameter, and ICMP code using the `toPort` parameter.
*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)

`ToPort`  <a name="cfn-lightsail-instance-port-toport"></a>
The last port in a range of open ports on an instance.  
Allowed ports:  
+ TCP and UDP - `0` to `65535`
+ ICMP - The ICMP code for IPv4 addresses. For example, specify `8` as the `fromPort` (ICMP type), and `-1` as the `toPort` (ICMP code), to enable ICMP Ping.
+ ICMPv6 - The ICMP code for IPv6 addresses. For example, specify `128` as the `fromPort` (ICMPv6 type), and `0` as `toPort` (ICMPv6 code).
*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::Instance State
<a name="aws-properties-lightsail-instance-state"></a>

`State` is a property of the [AWS::Lightsail::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html) resource. It describes the status code and the state (for example, `running`) of an instance.

## Syntax
<a name="aws-properties-lightsail-instance-state-syntax"></a>

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

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

```
{
  "[Code](#cfn-lightsail-instance-state-code)" : Integer,
  "[Name](#cfn-lightsail-instance-state-name)" : String
}
```

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

```
  [Code](#cfn-lightsail-instance-state-code): Integer
  [Name](#cfn-lightsail-instance-state-name): String
```

## Properties
<a name="aws-properties-lightsail-instance-state-properties"></a>

`Code`  <a name="cfn-lightsail-instance-state-code"></a>
The status code of the instance.  
*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)

`Name`  <a name="cfn-lightsail-instance-state-name"></a>
The state of the instance (for example, `running` or `pending`).  
*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::Instance Tag
<a name="aws-properties-lightsail-instance-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-instance-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-instance-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-instance-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)

# AWS::Lightsail::InstanceSnapshot
<a name="aws-resource-lightsail-instancesnapshot"></a>

Describes an instance snapshot.

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

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

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

```
{
  "Type" : "AWS::Lightsail::InstanceSnapshot",
  "Properties" : {
      "[InstanceName](#cfn-lightsail-instancesnapshot-instancename)" : String,
      "[InstanceSnapshotName](#cfn-lightsail-instancesnapshot-instancesnapshotname)" : String,
      "[Tags](#cfn-lightsail-instancesnapshot-tags)" : [ Tag, ... ]
    }
}
```

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

```
Type: AWS::Lightsail::InstanceSnapshot
Properties:
  [InstanceName](#cfn-lightsail-instancesnapshot-instancename): String
  [InstanceSnapshotName](#cfn-lightsail-instancesnapshot-instancesnapshotname): String
  [Tags](#cfn-lightsail-instancesnapshot-tags): 
    - Tag
```

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

`InstanceName`  <a name="cfn-lightsail-instancesnapshot-instancename"></a>
The name the user gave the instance (`Amazon_Linux_2023-1`).  
*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)

`InstanceSnapshotName`  <a name="cfn-lightsail-instancesnapshot-instancesnapshotname"></a>
The name of the snapshot.  
*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)

`Tags`  <a name="cfn-lightsail-instancesnapshot-tags"></a>
The tag keys and optional values for the 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).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-instancesnapshot-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-instancesnapshot-return-values"></a>

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

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

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

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the snapshot (`arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE`).

`FromInstanceArn`  <a name="FromInstanceArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the instance from which the snapshot was created (`arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE`).

`FromInstanceName`  <a name="FromInstanceName-fn::getatt"></a>
The instance from which the snapshot was created.

`IsFromAutoSnapshot`  <a name="IsFromAutoSnapshot-fn::getatt"></a>
A Boolean value indicating whether the snapshot was created from an automatic snapshot.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The type of resource (usually `InstanceSnapshot`).

`SizeInGb`  <a name="SizeInGb-fn::getatt"></a>
The size in GB of the SSD.

`State`  <a name="State-fn::getatt"></a>
The state the snapshot is in.

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.

# AWS::Lightsail::InstanceSnapshot Location
<a name="aws-properties-lightsail-instancesnapshot-location"></a>

<a name="aws-properties-lightsail-instancesnapshot-location-description"></a>The `Location` property type specifies Property description not available. for an [AWS::Lightsail::InstanceSnapshot](aws-resource-lightsail-instancesnapshot.md).

## Syntax
<a name="aws-properties-lightsail-instancesnapshot-location-syntax"></a>

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

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

```
{
  "[AvailabilityZone](#cfn-lightsail-instancesnapshot-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-instancesnapshot-location-regionname)" : String
}
```

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

```
  [AvailabilityZone](#cfn-lightsail-instancesnapshot-location-availabilityzone): String
  [RegionName](#cfn-lightsail-instancesnapshot-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-instancesnapshot-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-instancesnapshot-location-availabilityzone"></a>
Property description not available.  
*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)

`RegionName`  <a name="cfn-lightsail-instancesnapshot-location-regionname"></a>
Property description not available.  
*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::InstanceSnapshot Tag
<a name="aws-properties-lightsail-instancesnapshot-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-instancesnapshot-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-instancesnapshot-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-instancesnapshot-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)

# AWS::Lightsail::LoadBalancer
<a name="aws-resource-lightsail-loadbalancer"></a>

The `AWS::Lightsail::LoadBalancer` resource specifies a load balancer that can be used with Lightsail instances.

**Note**  
You cannot attach a TLS certificate to a load balancer using the `AWS::Lightsail::LoadBalancer` resource type. Instead, use the `AWS::Lightsail::LoadBalancerTlsCertificate` resource type to create a certificate and attach it to a load balancer.

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

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

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

```
{
  "Type" : "AWS::Lightsail::LoadBalancer",
  "Properties" : {
      "[AttachedInstances](#cfn-lightsail-loadbalancer-attachedinstances)" : [ String, ... ],
      "[HealthCheckPath](#cfn-lightsail-loadbalancer-healthcheckpath)" : String,
      "[InstancePort](#cfn-lightsail-loadbalancer-instanceport)" : Integer,
      "[IpAddressType](#cfn-lightsail-loadbalancer-ipaddresstype)" : String,
      "[LoadBalancerName](#cfn-lightsail-loadbalancer-loadbalancername)" : String,
      "[SessionStickinessEnabled](#cfn-lightsail-loadbalancer-sessionstickinessenabled)" : Boolean,
      "[SessionStickinessLBCookieDurationSeconds](#cfn-lightsail-loadbalancer-sessionstickinesslbcookiedurationseconds)" : String,
      "[Tags](#cfn-lightsail-loadbalancer-tags)" : [ Tag, ... ],
      "[TlsPolicyName](#cfn-lightsail-loadbalancer-tlspolicyname)" : String
    }
}
```

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

```
Type: AWS::Lightsail::LoadBalancer
Properties:
  [AttachedInstances](#cfn-lightsail-loadbalancer-attachedinstances): 
    - String
  [HealthCheckPath](#cfn-lightsail-loadbalancer-healthcheckpath): String
  [InstancePort](#cfn-lightsail-loadbalancer-instanceport): Integer
  [IpAddressType](#cfn-lightsail-loadbalancer-ipaddresstype): String
  [LoadBalancerName](#cfn-lightsail-loadbalancer-loadbalancername): String
  [SessionStickinessEnabled](#cfn-lightsail-loadbalancer-sessionstickinessenabled): Boolean
  [SessionStickinessLBCookieDurationSeconds](#cfn-lightsail-loadbalancer-sessionstickinesslbcookiedurationseconds): String
  [Tags](#cfn-lightsail-loadbalancer-tags): 
    - Tag
  [TlsPolicyName](#cfn-lightsail-loadbalancer-tlspolicyname): String
```

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

`AttachedInstances`  <a name="cfn-lightsail-loadbalancer-attachedinstances"></a>
The Lightsail instances to attach to the load balancer.  
*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)

`HealthCheckPath`  <a name="cfn-lightsail-loadbalancer-healthcheckpath"></a>
The path on the attached instance where the health check will be performed. If no path is specified, the load balancer tries to make a request to the default (root) page (`/index.html`).  
*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)

`InstancePort`  <a name="cfn-lightsail-loadbalancer-instanceport"></a>
The port that the load balancer uses to direct traffic to your Lightsail instances. For HTTP traffic, specify port `80`. For HTTPS traffic, specify port `443`.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: Updates are not supported.

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

`LoadBalancerName`  <a name="cfn-lightsail-loadbalancer-loadbalancername"></a>
The name of the load balancer.  
*Required*: Yes  
*Type*: String  
*Pattern*: `\w[\w\-]*\w`  
*Update requires*: Updates are not supported.

`SessionStickinessEnabled`  <a name="cfn-lightsail-loadbalancer-sessionstickinessenabled"></a>
A Boolean value indicating whether session stickiness is enabled.  
Enable session stickiness (also known as *session affinity*) to bind a user's session to a specific instance. This ensures that all requests from the user during the session are sent to the same instance.  
*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)

`SessionStickinessLBCookieDurationSeconds`  <a name="cfn-lightsail-loadbalancer-sessionstickinesslbcookiedurationseconds"></a>
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. If you do not specify this parameter, the default value is 0, which indicates that the sticky session should last for the duration of the browser session.  
*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)

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

`TlsPolicyName`  <a name="cfn-lightsail-loadbalancer-tlspolicyname"></a>
The name of the TLS security policy for the load balancer.  
*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)

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

### Ref
<a name="aws-resource-lightsail-loadbalancer-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-loadbalancer-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-loadbalancer-return-values-fn--getatt-fn--getatt"></a>

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

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

 *Load balancer TLS certificate* 

You cannot attach a TLS certificate to a load balancer using the `AWS::Lightsail::LoadBalancer` resource type. Instead, use the `AWS::Lightsail::LoadBalancerTlsCertificate` resource type to create and attach certificates to a load balancer.

 *Configuring HTTPS redirection* 

HTTPS redirection can only be set using the `HttpsRedirectionEnabled` parameter on the `AWS::Lightsail::LoadBalancerTlsCertificate` resource that is attached to the load balancer.

# AWS::Lightsail::LoadBalancer Tag
<a name="aws-properties-lightsail-loadbalancer-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-loadbalancer-tag-syntax"></a>

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

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

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

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

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

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

`Key`  <a name="cfn-lightsail-loadbalancer-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-loadbalancer-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)

# AWS::Lightsail::LoadBalancerTlsCertificate
<a name="aws-resource-lightsail-loadbalancertlscertificate"></a>

The `AWS::Lightsail::LoadBalancerTlsCertificate` resource specifies a TLS certificate that can be used with a Lightsail load balancer.

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

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

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

```
{
  "Type" : "AWS::Lightsail::LoadBalancerTlsCertificate",
  "Properties" : {
      "[CertificateAlternativeNames](#cfn-lightsail-loadbalancertlscertificate-certificatealternativenames)" : [ String, ... ],
      "[CertificateDomainName](#cfn-lightsail-loadbalancertlscertificate-certificatedomainname)" : String,
      "[CertificateName](#cfn-lightsail-loadbalancertlscertificate-certificatename)" : String,
      "[HttpsRedirectionEnabled](#cfn-lightsail-loadbalancertlscertificate-httpsredirectionenabled)" : Boolean,
      "[IsAttached](#cfn-lightsail-loadbalancertlscertificate-isattached)" : Boolean,
      "[LoadBalancerName](#cfn-lightsail-loadbalancertlscertificate-loadbalancername)" : String
    }
}
```

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

```
Type: AWS::Lightsail::LoadBalancerTlsCertificate
Properties:
  [CertificateAlternativeNames](#cfn-lightsail-loadbalancertlscertificate-certificatealternativenames): 
    - String
  [CertificateDomainName](#cfn-lightsail-loadbalancertlscertificate-certificatedomainname): String
  [CertificateName](#cfn-lightsail-loadbalancertlscertificate-certificatename): String
  [HttpsRedirectionEnabled](#cfn-lightsail-loadbalancertlscertificate-httpsredirectionenabled): Boolean
  [IsAttached](#cfn-lightsail-loadbalancertlscertificate-isattached): Boolean
  [LoadBalancerName](#cfn-lightsail-loadbalancertlscertificate-loadbalancername): String
```

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

`CertificateAlternativeNames`  <a name="cfn-lightsail-loadbalancertlscertificate-certificatealternativenames"></a>
An array of alternative domain names and subdomain names for your SSL/TLS certificate.  
In addition to the primary domain name, you can have up to nine alternative domain names. Wildcards (such as `*.example.com`) are not supported.  
*Required*: No  
*Type*: Array of String  
*Update requires*: Updates are not supported.

`CertificateDomainName`  <a name="cfn-lightsail-loadbalancertlscertificate-certificatedomainname"></a>
The domain name for the SSL/TLS certificate. For example, `example.com` or `www.example.com`.  
*Required*: Yes  
*Type*: String  
*Update requires*: Updates are not supported.

`CertificateName`  <a name="cfn-lightsail-loadbalancertlscertificate-certificatename"></a>
The name of the SSL/TLS certificate.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HttpsRedirectionEnabled`  <a name="cfn-lightsail-loadbalancertlscertificate-httpsredirectionenabled"></a>
A Boolean value indicating whether HTTPS redirection is enabled for the load balancer that the TLS certificate is attached to.  
*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)

`IsAttached`  <a name="cfn-lightsail-loadbalancertlscertificate-isattached"></a>
A Boolean value indicating whether the SSL/TLS certificate is attached to a Lightsail load balancer.  
*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)

`LoadBalancerName`  <a name="cfn-lightsail-loadbalancertlscertificate-loadbalancername"></a>
The name of the load balancer that the SSL/TLS certificate is attached to.  
*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)

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

### Ref
<a name="aws-resource-lightsail-loadbalancertlscertificate-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-loadbalancertlscertificate-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-loadbalancertlscertificate-return-values-fn--getatt-fn--getatt"></a>

`LoadBalancerTlsCertificateArn`  <a name="LoadBalancerTlsCertificateArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the SSL/TLS certificate.

`Status`  <a name="Status-fn::getatt"></a>
The validation status of the SSL/TLS certificate.  
Valid Values: `PENDING_VALIDATION` \$1 `ISSUED` \$1 `INACTIVE` \$1 `EXPIRED` \$1 `VALIDATION_TIMED_OUT` \$1 `REVOKED` \$1 `FAILED` \$1 `UNKNOWN`

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

 *Attaching certificates to load balancers* 

Use the `IsAttached` parameter to attach a certificate to a load balancer. The certificate must be in a valid state before it can be attached.

 *Replacing certificates attached to load balancers* 

After a certificate is attached to a load balancer, it cannot be detached. It can only be replaced. If the `isAttached` parameter is changed from `true` to `false` for a certificate, it won’t be detached from the load balancer and the stack will drift. You can replace a certificate by changing the `isAttached` parameter of a different certificate to `true` and changing the current certificate’s `isAttached` parameter to `false`.

 *Maximum attached certificates* 

Don't attach more than one certificate to a load balancer. If you attach multiple certificates to a load balancer, the behavior is unpredictable, and any one of the certificates might be in effect. This will cause the stack to drift because only one of the certificates is attached to the load balancer, but the template shows multiple.

 *Configuring HTTPS redirection* 

The `HttpsRedirectionEnabled` parameter can only be set on a certificate that is in a valid state and is also attached to a load balancer.

# AWS::Lightsail::StaticIp
<a name="aws-resource-lightsail-staticip"></a>

The `AWS::Lightsail::StaticIp` resource specifies a static IP that can be attached to an Amazon Lightsail instance that is in the same AWS Region and Availability Zone.

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

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

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

```
{
  "Type" : "AWS::Lightsail::StaticIp",
  "Properties" : {
      "[AttachedTo](#cfn-lightsail-staticip-attachedto)" : String,
      "[StaticIpName](#cfn-lightsail-staticip-staticipname)" : String
    }
}
```

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

```
Type: AWS::Lightsail::StaticIp
Properties:
  [AttachedTo](#cfn-lightsail-staticip-attachedto): String
  [StaticIpName](#cfn-lightsail-staticip-staticipname): String
```

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

`AttachedTo`  <a name="cfn-lightsail-staticip-attachedto"></a>
The instance that the static IP is attached to.  
*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)

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

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

### Ref
<a name="aws-resource-lightsail-staticip-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-staticip-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-staticip-return-values-fn--getatt-fn--getatt"></a>

`IpAddress`  <a name="IpAddress-fn::getatt"></a>
The IP address of the static IP.

`IsAttached`  <a name="IsAttached-fn::getatt"></a>
A Boolean value indicating whether the static IP is attached to an instance.

`StaticIpArn`  <a name="StaticIpArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the static IP (for example, `arn:aws:lightsail:us-east-2:123456789101:StaticIp/244ad76f-8aad-4741-809f-12345EXAMPLE`).

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

 *An instance must be in a running state to attach a static IP* 

To attach a static IP to an instance, the instance must be in a `running` state. If the instance does not come to `running` state within 15 minutes after performing an attach static IP request, the attach static IP request times-out.

 *You can attach only one static IP to an instance* 

You can attach one static IP to a single instance. You cannot attach multiple static IPs to one instance. If multiple static IPs have the same instance in the `AttachedTo` parameter, the behavior is unpredictable and any of the static IPs (but only one) could be attached to the instance. This will cause the stack to drift because only one of the static IPs will be attached to the instance but the template will show multiple.