# AWS::Lightsail Construct Library

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

```ts
import * as lightsail from 'aws-cdk-lib/aws-lightsail';
```

There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. Here are some suggestions on how to proceed:

- Search [Construct Hub for Lightsail construct libraries](https://constructs.dev/search?q=lightsail)
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::Lightsail resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Lightsail.html) directly.

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::Lightsail](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Lightsail.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

## Types

| Name | Kind | Summary |
| --- | --- | --- |
| [`CfnAlarm`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnAlarm) | Construct (L1) | The `AWS::Lightsail::Alarm` resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources. |
| [`CfnBucket`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnBucket) | Construct (L1) | The `AWS::Lightsail::Bucket` resource specifies a bucket. |
| [`CfnCertificate`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnCertificate) | Construct (L1) | 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. |
| [`CfnContactMethod`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContactMethod) | Construct (L1) | Resource Type definition for AWS::Lightsail::ContactMethod. |
| [`CfnContainer`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer) | Construct (L1) | The `AWS::Lightsail::Container` resource specifies a container service. |
| [`CfnDatabase`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabase) | Construct (L1) | The `AWS::Lightsail::Database` resource specifies an Amazon Lightsail database. |
| [`CfnDatabaseSnapshot`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabaseSnapshot) | Construct (L1) | Resource Type definition for AWS::Lightsail::DatabaseSnapshot. |
| [`CfnDisk`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDisk) | Construct (L1) | 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. |
| [`CfnDiskSnapshot`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDiskSnapshot) | Construct (L1) | Describes a block storage disk snapshot. |
| [`CfnDistribution`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution) | Construct (L1) | The `AWS::Lightsail::Distribution` resource specifies a content delivery network (CDN) distribution. |
| [`CfnDomain`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDomain) | Construct (L1) | Describes a domain where you are storing recordsets. |
| [`CfnInstance`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance) | Construct (L1) | The `AWS::Lightsail::Instance` resource specifies an Amazon Lightsail instance. |
| [`CfnInstanceSnapshot`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstanceSnapshot) | Construct (L1) | Describes an instance snapshot. |
| [`CfnKeyPair`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnKeyPair) | Construct (L1) | Resource Type definition for AWS::Lightsail::KeyPair. |
| [`CfnLoadBalancer`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnLoadBalancer) | Construct (L1) | The `AWS::Lightsail::LoadBalancer` resource specifies a load balancer that can be used with Lightsail instances. |
| [`CfnLoadBalancerTlsCertificate`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnLoadBalancerTlsCertificate) | Construct (L1) | The `AWS::Lightsail::LoadBalancerTlsCertificate` resource specifies a TLS certificate that can be used with a Lightsail load balancer. |
| [`CfnStaticIp`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnStaticIp) | Construct (L1) | 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. |
| [`CfnAlarmProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnAlarmProps) | Struct | Properties for defining a `CfnAlarm`. |
| [`CfnBucket.AccessRulesProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnBucket.AccessRulesProperty) | Struct | `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. |
| [`CfnBucketProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnBucketProps) | Struct | Properties for defining a `CfnBucket`. |
| [`CfnCertificateProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnCertificateProps) | Struct | Properties for defining a `CfnCertificate`. |
| [`CfnContactMethodProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContactMethodProps) | Struct | Properties for defining a `CfnContactMethod`. |
| [`CfnContainer.ContainerProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.ContainerProperty) | Struct | `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. |
| [`CfnContainer.ContainerServiceDeploymentProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.ContainerServiceDeploymentProperty) | Struct | `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. |
| [`CfnContainer.EcrImagePullerRoleProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.EcrImagePullerRoleProperty) | Struct | Describes the IAM role that you can use to grant a Lightsail container service access to Amazon ECR private repositories. |
| [`CfnContainer.EnvironmentVariableProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.EnvironmentVariableProperty) | Struct | `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. |
| [`CfnContainer.HealthCheckConfigProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.HealthCheckConfigProperty) | Struct | `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. |
| [`CfnContainer.PortInfoProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.PortInfoProperty) | Struct | `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. |
| [`CfnContainer.PrivateRegistryAccessProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.PrivateRegistryAccessProperty) | Struct | Describes the configuration for an Amazon Lightsail container service to access private container image repositories, such as ( Amazon ECR ) private repositories. |
| [`CfnContainer.PublicDomainNameProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.PublicDomainNameProperty) | Struct | `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. |
| [`CfnContainer.PublicEndpointProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainer.PublicEndpointProperty) | Struct | `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. |
| [`CfnContainerProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnContainerProps) | Struct | Properties for defining a `CfnContainer`. |
| [`CfnDatabase.RelationalDatabaseParameterProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabase.RelationalDatabaseParameterProperty) | Struct | `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. |
| [`CfnDatabaseProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabaseProps) | Struct | Properties for defining a `CfnDatabase`. |
| [`CfnDatabaseSnapshot.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabaseSnapshot.LocationProperty) | Struct | The Region name and Availability Zone where the database snapshot is located. |
| [`CfnDatabaseSnapshotProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDatabaseSnapshotProps) | Struct | Properties for defining a `CfnDatabaseSnapshot`. |
| [`CfnDisk.AddOnProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDisk.AddOnProperty) | Struct | `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. |
| [`CfnDisk.AutoSnapshotAddOnProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDisk.AutoSnapshotAddOnProperty) | Struct | `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. |
| [`CfnDisk.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDisk.LocationProperty) | Struct | The AWS Region and Availability Zone where the disk is located. |
| [`CfnDiskProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDiskProps) | Struct | Properties for defining a `CfnDisk`. |
| [`CfnDiskSnapshot.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDiskSnapshot.LocationProperty) | Struct | The AWS Region and Availability Zone where the disk snapshot was created. |
| [`CfnDiskSnapshotProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDiskSnapshotProps) | Struct | Properties for defining a `CfnDiskSnapshot`. |
| [`CfnDistribution.CacheBehaviorPerPathProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheBehaviorPerPathProperty) | Struct | `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. |
| [`CfnDistribution.CacheBehaviorProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheBehaviorProperty) | Struct | `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. |
| [`CfnDistribution.CacheSettingsProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheSettingsProperty) | Struct | `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. |
| [`CfnDistribution.CookieObjectProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CookieObjectProperty) | Struct | `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. |
| [`CfnDistribution.HeaderObjectProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.HeaderObjectProperty) | Struct | `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. |
| [`CfnDistribution.InputOriginProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.InputOriginProperty) | Struct | `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. |
| [`CfnDistribution.QueryStringObjectProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.QueryStringObjectProperty) | Struct | `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. |
| [`CfnDistributionProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistributionProps) | Struct | Properties for defining a `CfnDistribution`. |
| [`CfnDomain.DomainEntryProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDomain.DomainEntryProperty) | Struct | Describes a domain recordset entry. |
| [`CfnDomain.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDomain.LocationProperty) | Struct | The AWS Region and Availability Zone where the domain was created (read-only). |
| [`CfnDomainProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnDomainProps) | Struct | Properties for defining a `CfnDomain`. |
| [`CfnInstance.AddOnProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.AddOnProperty) | Struct | `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. |
| [`CfnInstance.AutoSnapshotAddOnProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.AutoSnapshotAddOnProperty) | Struct | `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. |
| [`CfnInstance.DiskProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.DiskProperty) | Struct | `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. |
| [`CfnInstance.HardwareProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.HardwareProperty) | Struct | `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. |
| [`CfnInstance.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.LocationProperty) | Struct | `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. |
| [`CfnInstance.MonthlyTransferProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.MonthlyTransferProperty) | Struct | `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. |
| [`CfnInstance.NetworkingProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.NetworkingProperty) | Struct | `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. |
| [`CfnInstance.PortProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.PortProperty) | Struct | `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. |
| [`CfnInstance.StateProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstance.StateProperty) | Struct | `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. |
| [`CfnInstanceProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstanceProps) | Struct | Properties for defining a `CfnInstance`. |
| [`CfnInstanceSnapshot.LocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstanceSnapshot.LocationProperty) | Struct | The region name and Availability Zone where you created the snapshot. |
| [`CfnInstanceSnapshotProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnInstanceSnapshotProps) | Struct | Properties for defining a `CfnInstanceSnapshot`. |
| [`CfnKeyPair.ResourceLocationProperty`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnKeyPair.ResourceLocationProperty) | Struct |  |
| [`CfnKeyPairProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnKeyPairProps) | Struct | Properties for defining a `CfnKeyPair`. |
| [`CfnLoadBalancerProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnLoadBalancerProps) | Struct | Properties for defining a `CfnLoadBalancer`. |
| [`CfnLoadBalancerTlsCertificateProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnLoadBalancerTlsCertificateProps) | Struct | Properties for defining a `CfnLoadBalancerTlsCertificate`. |
| [`CfnStaticIpProps`](/v2/docs/aws-cdk-lib.aws_lightsail.CfnStaticIpProps) | Struct | Properties for defining a `CfnStaticIp`. |
