

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

# AWS::Lightsail::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)