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.
AWS::Lightsail::Instance
The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Lightsail::Instance", "Properties" : { "AddOns" :[ AddOn, ... ], "AvailabilityZone" :String, "BlueprintId" :String, "BundleId" :String, "Hardware" :Hardware, "InstanceName" :String, "KeyPairName" :String, "Location" :Location, "Networking" :Networking, "State" :State, "Tags" :[ Tag, ... ], "UserData" :String} }
YAML
Type: AWS::Lightsail::Instance Properties: AddOns:- AddOnAvailabilityZone:StringBlueprintId:StringBundleId:StringHardware:HardwareInstanceName:StringKeyPairName:StringLocation:LocationNetworking:NetworkingState:StateTags:- TagUserData:String
Properties
AddOns-
An array of add-ons for the instance.
Note
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
Update requires: No interruption
AvailabilityZone-
The Availability Zone for the instance.
Required: No
Type: String
Minimum:
1Maximum:
255Update requires: Updates are not supported.
BlueprintId-
The blueprint ID for the instance (for example,
os_amlinux_2016_03).Required: Yes
Type: String
Minimum:
1Maximum:
255Update requires: Updates are not supported.
BundleId-
The bundle ID for the instance (for example,
micro_1_0).Required: Yes
Type: String
Minimum:
1Maximum:
255Update requires: Updates are not supported.
Hardware-
The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.
Important
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
Update requires: Some interruptions
InstanceName-
The name of the instance.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9][\w\-.]*[a-zA-Z0-9]$Minimum:
1Maximum:
254Update requires: Replacement
KeyPairName-
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
Location-
The location for the instance, such as the AWS Region and Availability Zone.
Note
The
Locationproperty is read-only and should not be specified in a create instance or update instance request.Required: No
Type: Location
Update requires: Updates are not supported.
Networking-
The public ports and the monthly amount of data transfer allocated for the instance.
Required: No
Type: Networking
Update requires: No interruption
State-
The status code and the state (for example,
running) of the instance.Note
The
Stateproperty is read-only and should not be specified in a create instance or update instance request.Required: No
Type: State
Update requires: Updates are not supported.
-
An array of key-value pairs to apply to this resource.
For more information, see Tag in the AWS CloudFormation User Guide.
Note
The
ValueofTagsis optional for Lightsail resources.Required: No
Type: Array of Tag
Update requires: No interruption
UserData