AWS::Lightsail::Container - AWS CloudFormation

AWS::Lightsail::Container

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

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

Syntax

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

JSON

{ "Type" : "AWS::Lightsail::Container", "Properties" : { "ContainerServiceDeployment" : ContainerServiceDeployment, "IsDisabled" : Boolean, "Power" : String, "PublicDomainNames" : [ PublicDomainName, ... ], "Scale" : Integer, "ServiceName" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Lightsail::Container Properties: ContainerServiceDeployment: ContainerServiceDeployment IsDisabled: Boolean Power: String PublicDomainNames: - PublicDomainName Scale: Integer ServiceName: String Tags: - Tag

Properties

ContainerServiceDeployment

An object that describes the current container deployment of the container service.

Required: No

Type: ContainerServiceDeployment

Update requires: Some interruptions

IsDisabled

A Boolean value indicating whether the container service is disabled.

Required: No

Type: Boolean

Update requires: No interruption

Power

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: large | medium | micro | nano | small | xlarge

Update requires: No interruption

PublicDomainNames

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.

Important

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 resource to create a certificate for the public domain names that you want to use with your container service.

Required: No

Type: List of PublicDomainName

Update requires: No interruption

Scale

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

ServiceName

The name of the container service.

Required: Yes

Type: String

Update requires: Replacement

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide.

Note

The Value of Tags is optional for Lightsail resources.

Required: No

Type: List of Tag

Update requires: No interruption

Return values

Ref

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

Fn::GetAtt

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 Fn::GetAtt.

ContainerArn

The Amazon Resource Name (ARN) of the container.

Url

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

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.