AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Lightsail::Container

CfnContainer

The `AWS::Lightsail::Container` resource specifies a container service. A Lightsail container service is a compute resource to which you can deploy containers.

Import

import { CfnContainer } from 'aws-cdk-lib/aws-lightsail';

Or use the module namespace:

import * as lightsail from 'aws-cdk-lib/aws-lightsail';
// lightsail.CfnContainer

Properties

Configuration passed to the constructor as CfnContainerProps.

powerRequired
string

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.

scaleRequired
number

The scale specification of the container service. The scale specifies the allocated compute nodes of the container service.

serviceNameRequired
string

The name of the container service.

containerServiceDeploymentOptional
IResolvable | ContainerServiceDeploymentProperty

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

isDisabledOptional
boolean | IResolvable

A Boolean value indicating whether the container service is disabled.

privateRegistryAccessOptional
IResolvable | PrivateRegistryAccessProperty

An object that describes the configuration for the container service to access private container image repositories, such as ( 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* .

publicDomainNamesOptional
IResolvable | IResolvable | PublicDomainNameProperty[]

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.

tagsOptional
CfnTag[]

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.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter