1. Packages
  2. AWS
  3. API Docs
  4. lightsail
  5. Instance
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
aws logo
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi

    Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See What is Amazon Lightsail? for more information.

    Note: Lightsail is currently only supported in a limited number of AWS Regions, please see “Regions and Availability Zones in Amazon Lightsail” for more details

    Availability Zones

    Lightsail currently supports the following Availability Zones (e.g., us-east-1a):

    • ap-northeast-1{a,c,d}
    • ap-northeast-2{a,c}
    • ap-south-1{a,b}
    • ap-southeast-1{a,b,c}
    • ap-southeast-2{a,b,c}
    • ca-central-1{a,b}
    • eu-central-1{a,b,c}
    • eu-west-1{a,b,c}
    • eu-west-2{a,b,c}
    • eu-west-3{a,b,c}
    • us-east-1{a,b,c,d,e,f}
    • us-east-2{a,b,c}
    • us-west-2{a,b,c}

    Bundles

    Lightsail currently supports the following Bundle IDs (e.g., an instance in ap-northeast-1 would use small_2_0):

    Prefix

    A Bundle ID starts with one of the below size prefixes:

    • nano_
    • micro_
    • small_
    • medium_
    • large_
    • xlarge_
    • 2xlarge_

    Suffix

    A Bundle ID ends with one of the following suffixes depending on Availability Zone:

    • ap-northeast-1: 2_0
    • ap-northeast-2: 2_0
    • ap-south-1: 2_1
    • ap-southeast-1: 2_0
    • ap-southeast-2: 2_2
    • ca-central-1: 2_0
    • eu-central-1: 2_0
    • eu-west-1: 2_0
    • eu-west-2: 2_0
    • eu-west-3: 2_0
    • us-east-1: 2_0
    • us-east-2: 2_0
    • us-west-2: 2_0

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new GitLab Lightsail Instance
        var gitlabTest = new Aws.LightSail.Instance("gitlabTest", new()
        {
            AvailabilityZone = "us-east-1b",
            BlueprintId = "amazon_linux_2",
            BundleId = "nano_1_0",
            KeyPairName = "some_key_name",
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewInstance(ctx, "gitlabTest", &lightsail.InstanceArgs{
    			AvailabilityZone: pulumi.String("us-east-1b"),
    			BlueprintId:      pulumi.String("amazon_linux_2"),
    			BundleId:         pulumi.String("nano_1_0"),
    			KeyPairName:      pulumi.String("some_key_name"),
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Instance;
    import com.pulumi.aws.lightsail.InstanceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var gitlabTest = new Instance("gitlabTest", InstanceArgs.builder()        
                .availabilityZone("us-east-1b")
                .blueprintId("amazon_linux_2")
                .bundleId("nano_1_0")
                .keyPairName("some_key_name")
                .tags(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // Create a new GitLab Lightsail Instance
    const gitlabTest = new aws.lightsail.Instance("gitlabTest", {
        availabilityZone: "us-east-1b",
        blueprintId: "amazon_linux_2",
        bundleId: "nano_1_0",
        keyPairName: "some_key_name",
        tags: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    # Create a new GitLab Lightsail Instance
    gitlab_test = aws.lightsail.Instance("gitlabTest",
        availability_zone="us-east-1b",
        blueprint_id="amazon_linux_2",
        bundle_id="nano_1_0",
        key_pair_name="some_key_name",
        tags={
            "foo": "bar",
        })
    
    resources:
      # Create a new GitLab Lightsail Instance
      gitlabTest:
        type: aws:lightsail:Instance
        properties:
          availabilityZone: us-east-1b
          blueprintId: amazon_linux_2
          bundleId: nano_1_0
          keyPairName: some_key_name
          tags:
            foo: bar
    

    Example With User Data

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var custom = new Aws.LightSail.Instance("custom", new()
        {
            AvailabilityZone = "us-east-1b",
            BlueprintId = "amazon_linux_2",
            BundleId = "nano_1_0",
            UserData = "sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewInstance(ctx, "custom", &lightsail.InstanceArgs{
    			AvailabilityZone: pulumi.String("us-east-1b"),
    			BlueprintId:      pulumi.String("amazon_linux_2"),
    			BundleId:         pulumi.String("nano_1_0"),
    			UserData:         pulumi.String("sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Instance;
    import com.pulumi.aws.lightsail.InstanceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var custom = new Instance("custom", InstanceArgs.builder()        
                .availabilityZone("us-east-1b")
                .blueprintId("amazon_linux_2")
                .bundleId("nano_1_0")
                .userData("sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const custom = new aws.lightsail.Instance("custom", {
        availabilityZone: "us-east-1b",
        blueprintId: "amazon_linux_2",
        bundleId: "nano_1_0",
        userData: "sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    custom = aws.lightsail.Instance("custom",
        availability_zone="us-east-1b",
        blueprint_id="amazon_linux_2",
        bundle_id="nano_1_0",
        user_data="sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html")
    
    resources:
      custom:
        type: aws:lightsail:Instance
        properties:
          availabilityZone: us-east-1b
          blueprintId: amazon_linux_2
          bundleId: nano_1_0
          userData: sudo yum install -y httpd && sudo systemctl start httpd && sudo systemctl enable httpd && echo '<h1>Deployed via Pulumi</h1>' | sudo tee /var/www/html/index.html
    

    Enable Auto Snapshots

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.Instance("test", new()
        {
            AddOn = new Aws.LightSail.Inputs.InstanceAddOnArgs
            {
                SnapshotTime = "06:00",
                Status = "Enabled",
                Type = "AutoSnapshot",
            },
            AvailabilityZone = "us-east-1b",
            BlueprintId = "amazon_linux_2",
            BundleId = "nano_1_0",
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewInstance(ctx, "test", &lightsail.InstanceArgs{
    			AddOn: &lightsail.InstanceAddOnArgs{
    				SnapshotTime: pulumi.String("06:00"),
    				Status:       pulumi.String("Enabled"),
    				Type:         pulumi.String("AutoSnapshot"),
    			},
    			AvailabilityZone: pulumi.String("us-east-1b"),
    			BlueprintId:      pulumi.String("amazon_linux_2"),
    			BundleId:         pulumi.String("nano_1_0"),
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Instance;
    import com.pulumi.aws.lightsail.InstanceArgs;
    import com.pulumi.aws.lightsail.inputs.InstanceAddOnArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Instance("test", InstanceArgs.builder()        
                .addOn(InstanceAddOnArgs.builder()
                    .snapshotTime("06:00")
                    .status("Enabled")
                    .type("AutoSnapshot")
                    .build())
                .availabilityZone("us-east-1b")
                .blueprintId("amazon_linux_2")
                .bundleId("nano_1_0")
                .tags(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.Instance("test", {
        addOn: {
            snapshotTime: "06:00",
            status: "Enabled",
            type: "AutoSnapshot",
        },
        availabilityZone: "us-east-1b",
        blueprintId: "amazon_linux_2",
        bundleId: "nano_1_0",
        tags: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.Instance("test",
        add_on=aws.lightsail.InstanceAddOnArgs(
            snapshot_time="06:00",
            status="Enabled",
            type="AutoSnapshot",
        ),
        availability_zone="us-east-1b",
        blueprint_id="amazon_linux_2",
        bundle_id="nano_1_0",
        tags={
            "foo": "bar",
        })
    
    resources:
      test:
        type: aws:lightsail:Instance
        properties:
          addOn:
            snapshotTime: 06:00
            status: Enabled
            type: AutoSnapshot
          availabilityZone: us-east-1b
          blueprintId: amazon_linux_2
          bundleId: nano_1_0
          tags:
            foo: bar
    

    Create Instance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 availability_zone: Optional[str] = None,
                 blueprint_id: Optional[str] = None,
                 bundle_id: Optional[str] = None,
                 add_on: Optional[InstanceAddOnArgs] = None,
                 ip_address_type: Optional[str] = None,
                 key_pair_name: Optional[str] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 user_data: Optional[str] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:Instance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleinstanceResourceResourceFromLightsailinstance = new Aws.LightSail.Instance("exampleinstanceResourceResourceFromLightsailinstance", new()
    {
        AvailabilityZone = "string",
        BlueprintId = "string",
        BundleId = "string",
        AddOn = new Aws.LightSail.Inputs.InstanceAddOnArgs
        {
            SnapshotTime = "string",
            Status = "string",
            Type = "string",
        },
        IpAddressType = "string",
        KeyPairName = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
        UserData = "string",
    });
    
    example, err := lightsail.NewInstance(ctx, "exampleinstanceResourceResourceFromLightsailinstance", &lightsail.InstanceArgs{
    	AvailabilityZone: pulumi.String("string"),
    	BlueprintId:      pulumi.String("string"),
    	BundleId:         pulumi.String("string"),
    	AddOn: &lightsail.InstanceAddOnArgs{
    		SnapshotTime: pulumi.String("string"),
    		Status:       pulumi.String("string"),
    		Type:         pulumi.String("string"),
    	},
    	IpAddressType: pulumi.String("string"),
    	KeyPairName:   pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	UserData: pulumi.String("string"),
    })
    
    var exampleinstanceResourceResourceFromLightsailinstance = new com.pulumi.aws.lightsail.Instance("exampleinstanceResourceResourceFromLightsailinstance", com.pulumi.aws.lightsail.InstanceArgs.builder()
        .availabilityZone("string")
        .blueprintId("string")
        .bundleId("string")
        .addOn(InstanceAddOnArgs.builder()
            .snapshotTime("string")
            .status("string")
            .type("string")
            .build())
        .ipAddressType("string")
        .keyPairName("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .userData("string")
        .build());
    
    exampleinstance_resource_resource_from_lightsailinstance = aws.lightsail.Instance("exampleinstanceResourceResourceFromLightsailinstance",
        availability_zone="string",
        blueprint_id="string",
        bundle_id="string",
        add_on={
            "snapshot_time": "string",
            "status": "string",
            "type": "string",
        },
        ip_address_type="string",
        key_pair_name="string",
        name="string",
        tags={
            "string": "string",
        },
        user_data="string")
    
    const exampleinstanceResourceResourceFromLightsailinstance = new aws.lightsail.Instance("exampleinstanceResourceResourceFromLightsailinstance", {
        availabilityZone: "string",
        blueprintId: "string",
        bundleId: "string",
        addOn: {
            snapshotTime: "string",
            status: "string",
            type: "string",
        },
        ipAddressType: "string",
        keyPairName: "string",
        name: "string",
        tags: {
            string: "string",
        },
        userData: "string",
    });
    
    type: aws:lightsail:Instance
    properties:
        addOn:
            snapshotTime: string
            status: string
            type: string
        availabilityZone: string
        blueprintId: string
        bundleId: string
        ipAddressType: string
        keyPairName: string
        name: string
        tags:
            string: string
        userData: string
    

    Instance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Instance resource accepts the following input properties:

    AvailabilityZone string
    The Availability Zone in which to create your instance (see list below)
    BlueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    BundleId string
    The bundle of specification information (see list below)
    AddOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    IpAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    KeyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    Name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UserData string
    Single lined launch script as a string to configure server with additional user data
    AvailabilityZone string
    The Availability Zone in which to create your instance (see list below)
    BlueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    BundleId string
    The bundle of specification information (see list below)
    AddOn InstanceAddOnArgs
    The add on configuration for the instance. Detailed below.
    IpAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    KeyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    Name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UserData string
    Single lined launch script as a string to configure server with additional user data
    availabilityZone String
    The Availability Zone in which to create your instance (see list below)
    blueprintId String
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId String
    The bundle of specification information (see list below)
    addOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    ipAddressType String
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    keyPairName String
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name String
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userData String
    Single lined launch script as a string to configure server with additional user data
    availabilityZone string
    The Availability Zone in which to create your instance (see list below)
    blueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId string
    The bundle of specification information (see list below)
    addOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    ipAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    keyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userData string
    Single lined launch script as a string to configure server with additional user data
    availability_zone str
    The Availability Zone in which to create your instance (see list below)
    blueprint_id str
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundle_id str
    The bundle of specification information (see list below)
    add_on InstanceAddOnArgs
    The add on configuration for the instance. Detailed below.
    ip_address_type str
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    key_pair_name str
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name str
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    tags Mapping[str, str]
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    user_data str
    Single lined launch script as a string to configure server with additional user data
    availabilityZone String
    The Availability Zone in which to create your instance (see list below)
    blueprintId String
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId String
    The bundle of specification information (see list below)
    addOn Property Map
    The add on configuration for the instance. Detailed below.
    ipAddressType String
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    keyPairName String
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name String
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    userData String
    Single lined launch script as a string to configure server with additional user data

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

    Arn string
    The ARN of the Lightsail instance (matches id).
    CpuCount int
    The number of vCPUs the instance has.
    CreatedAt string
    The timestamp when the instance was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    Ipv6Addresses List<string>
    List of IPv6 addresses for the Lightsail instance.
    IsStaticIp bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    PrivateIpAddress string
    The private IP address of the instance.
    PublicIpAddress string
    The public IP address of the instance.
    RamSize double
    The amount of RAM in GB on the instance (e.g., 1.0).
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Username string
    The user name for connecting to the instance (e.g., ec2-user).
    Arn string
    The ARN of the Lightsail instance (matches id).
    CpuCount int
    The number of vCPUs the instance has.
    CreatedAt string
    The timestamp when the instance was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    Ipv6Addresses []string
    List of IPv6 addresses for the Lightsail instance.
    IsStaticIp bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    PrivateIpAddress string
    The private IP address of the instance.
    PublicIpAddress string
    The public IP address of the instance.
    RamSize float64
    The amount of RAM in GB on the instance (e.g., 1.0).
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Username string
    The user name for connecting to the instance (e.g., ec2-user).
    arn String
    The ARN of the Lightsail instance (matches id).
    cpuCount Integer
    The number of vCPUs the instance has.
    createdAt String
    The timestamp when the instance was created.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6Address String
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses List<String>
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp Boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    privateIpAddress String
    The private IP address of the instance.
    publicIpAddress String
    The public IP address of the instance.
    ramSize Double
    The amount of RAM in GB on the instance (e.g., 1.0).
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    username String
    The user name for connecting to the instance (e.g., ec2-user).
    arn string
    The ARN of the Lightsail instance (matches id).
    cpuCount number
    The number of vCPUs the instance has.
    createdAt string
    The timestamp when the instance was created.
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses string[]
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    privateIpAddress string
    The private IP address of the instance.
    publicIpAddress string
    The public IP address of the instance.
    ramSize number
    The amount of RAM in GB on the instance (e.g., 1.0).
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    username string
    The user name for connecting to the instance (e.g., ec2-user).
    arn str
    The ARN of the Lightsail instance (matches id).
    cpu_count int
    The number of vCPUs the instance has.
    created_at str
    The timestamp when the instance was created.
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6_address str
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6_addresses Sequence[str]
    List of IPv6 addresses for the Lightsail instance.
    is_static_ip bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    private_ip_address str
    The private IP address of the instance.
    public_ip_address str
    The public IP address of the instance.
    ram_size float
    The amount of RAM in GB on the instance (e.g., 1.0).
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    username str
    The user name for connecting to the instance (e.g., ec2-user).
    arn String
    The ARN of the Lightsail instance (matches id).
    cpuCount Number
    The number of vCPUs the instance has.
    createdAt String
    The timestamp when the instance was created.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6Address String
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses List<String>
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp Boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    privateIpAddress String
    The private IP address of the instance.
    publicIpAddress String
    The public IP address of the instance.
    ramSize Number
    The amount of RAM in GB on the instance (e.g., 1.0).
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    username String
    The user name for connecting to the instance (e.g., ec2-user).

    Look up Existing Instance Resource

    Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            add_on: Optional[InstanceAddOnArgs] = None,
            arn: Optional[str] = None,
            availability_zone: Optional[str] = None,
            blueprint_id: Optional[str] = None,
            bundle_id: Optional[str] = None,
            cpu_count: Optional[int] = None,
            created_at: Optional[str] = None,
            ip_address_type: Optional[str] = None,
            ipv6_address: Optional[str] = None,
            ipv6_addresses: Optional[Sequence[str]] = None,
            is_static_ip: Optional[bool] = None,
            key_pair_name: Optional[str] = None,
            name: Optional[str] = None,
            private_ip_address: Optional[str] = None,
            public_ip_address: Optional[str] = None,
            ram_size: Optional[float] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            user_data: Optional[str] = None,
            username: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    resources:  _:    type: aws:lightsail:Instance    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AddOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    Arn string
    The ARN of the Lightsail instance (matches id).
    AvailabilityZone string
    The Availability Zone in which to create your instance (see list below)
    BlueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    BundleId string
    The bundle of specification information (see list below)
    CpuCount int
    The number of vCPUs the instance has.
    CreatedAt string
    The timestamp when the instance was created.
    IpAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    Ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    Ipv6Addresses List<string>
    List of IPv6 addresses for the Lightsail instance.
    IsStaticIp bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    KeyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    Name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    PrivateIpAddress string
    The private IP address of the instance.
    PublicIpAddress string
    The public IP address of the instance.
    RamSize double
    The amount of RAM in GB on the instance (e.g., 1.0).
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    UserData string
    Single lined launch script as a string to configure server with additional user data
    Username string
    The user name for connecting to the instance (e.g., ec2-user).
    AddOn InstanceAddOnArgs
    The add on configuration for the instance. Detailed below.
    Arn string
    The ARN of the Lightsail instance (matches id).
    AvailabilityZone string
    The Availability Zone in which to create your instance (see list below)
    BlueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    BundleId string
    The bundle of specification information (see list below)
    CpuCount int
    The number of vCPUs the instance has.
    CreatedAt string
    The timestamp when the instance was created.
    IpAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    Ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    Ipv6Addresses []string
    List of IPv6 addresses for the Lightsail instance.
    IsStaticIp bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    KeyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    Name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    PrivateIpAddress string
    The private IP address of the instance.
    PublicIpAddress string
    The public IP address of the instance.
    RamSize float64
    The amount of RAM in GB on the instance (e.g., 1.0).
    Tags map[string]string
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    UserData string
    Single lined launch script as a string to configure server with additional user data
    Username string
    The user name for connecting to the instance (e.g., ec2-user).
    addOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    arn String
    The ARN of the Lightsail instance (matches id).
    availabilityZone String
    The Availability Zone in which to create your instance (see list below)
    blueprintId String
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId String
    The bundle of specification information (see list below)
    cpuCount Integer
    The number of vCPUs the instance has.
    createdAt String
    The timestamp when the instance was created.
    ipAddressType String
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    ipv6Address String
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses List<String>
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp Boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    keyPairName String
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name String
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    privateIpAddress String
    The private IP address of the instance.
    publicIpAddress String
    The public IP address of the instance.
    ramSize Double
    The amount of RAM in GB on the instance (e.g., 1.0).
    tags Map<String,String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    userData String
    Single lined launch script as a string to configure server with additional user data
    username String
    The user name for connecting to the instance (e.g., ec2-user).
    addOn InstanceAddOn
    The add on configuration for the instance. Detailed below.
    arn string
    The ARN of the Lightsail instance (matches id).
    availabilityZone string
    The Availability Zone in which to create your instance (see list below)
    blueprintId string
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId string
    The bundle of specification information (see list below)
    cpuCount number
    The number of vCPUs the instance has.
    createdAt string
    The timestamp when the instance was created.
    ipAddressType string
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    ipv6Address string
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses string[]
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    keyPairName string
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name string
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    privateIpAddress string
    The private IP address of the instance.
    publicIpAddress string
    The public IP address of the instance.
    ramSize number
    The amount of RAM in GB on the instance (e.g., 1.0).
    tags {[key: string]: string}
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    userData string
    Single lined launch script as a string to configure server with additional user data
    username string
    The user name for connecting to the instance (e.g., ec2-user).
    add_on InstanceAddOnArgs
    The add on configuration for the instance. Detailed below.
    arn str
    The ARN of the Lightsail instance (matches id).
    availability_zone str
    The Availability Zone in which to create your instance (see list below)
    blueprint_id str
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundle_id str
    The bundle of specification information (see list below)
    cpu_count int
    The number of vCPUs the instance has.
    created_at str
    The timestamp when the instance was created.
    ip_address_type str
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    ipv6_address str
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6_addresses Sequence[str]
    List of IPv6 addresses for the Lightsail instance.
    is_static_ip bool
    A Boolean value indicating whether this instance has a static IP assigned to it.
    key_pair_name str
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name str
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    private_ip_address str
    The private IP address of the instance.
    public_ip_address str
    The public IP address of the instance.
    ram_size float
    The amount of RAM in GB on the instance (e.g., 1.0).
    tags Mapping[str, str]
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    user_data str
    Single lined launch script as a string to configure server with additional user data
    username str
    The user name for connecting to the instance (e.g., ec2-user).
    addOn Property Map
    The add on configuration for the instance. Detailed below.
    arn String
    The ARN of the Lightsail instance (matches id).
    availabilityZone String
    The Availability Zone in which to create your instance (see list below)
    blueprintId String
    The ID for a virtual private server image. A list of available blueprint IDs can be obtained using the AWS CLI command: aws lightsail get-blueprints
    bundleId String
    The bundle of specification information (see list below)
    cpuCount Number
    The number of vCPUs the instance has.
    createdAt String
    The timestamp when the instance was created.
    ipAddressType String
    The IP address type of the Lightsail Instance. Valid Values: dualstack | ipv4.
    ipv6Address String
    (Deprecated) The first IPv6 address of the Lightsail instance. Use ipv6_addresses attribute instead.

    Deprecated: use ipv6_addresses attribute instead

    ipv6Addresses List<String>
    List of IPv6 addresses for the Lightsail instance.
    isStaticIp Boolean
    A Boolean value indicating whether this instance has a static IP assigned to it.
    keyPairName String
    The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)
    name String
    The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
    privateIpAddress String
    The private IP address of the instance.
    publicIpAddress String
    The public IP address of the instance.
    ramSize Number
    The amount of RAM in GB on the instance (e.g., 1.0).
    tags Map<String>
    A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    userData String
    Single lined launch script as a string to configure server with additional user data
    username String
    The user name for connecting to the instance (e.g., ec2-user).

    Supporting Types

    InstanceAddOn, InstanceAddOnArgs

    SnapshotTime string
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    Status string
    The status of the add on. Valid Values: Enabled, Disabled.
    Type string
    The add-on type. There is currently only one valid type AutoSnapshot.
    SnapshotTime string
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    Status string
    The status of the add on. Valid Values: Enabled, Disabled.
    Type string
    The add-on type. There is currently only one valid type AutoSnapshot.
    snapshotTime String
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    status String
    The status of the add on. Valid Values: Enabled, Disabled.
    type String
    The add-on type. There is currently only one valid type AutoSnapshot.
    snapshotTime string
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    status string
    The status of the add on. Valid Values: Enabled, Disabled.
    type string
    The add-on type. There is currently only one valid type AutoSnapshot.
    snapshot_time str
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    status str
    The status of the add on. Valid Values: Enabled, Disabled.
    type str
    The add-on type. There is currently only one valid type AutoSnapshot.
    snapshotTime String
    The daily time when an automatic snapshot will be created. Must be in HH:00 format, and in an hourly increment and specified in Coordinated Universal Time (UTC). The snapshot will be automatically created between the time specified and up to 45 minutes after.
    status String
    The status of the add on. Valid Values: Enabled, Disabled.
    type String
    The add-on type. There is currently only one valid type AutoSnapshot.

    Import

    Lightsail Instances can be imported using their name, e.g.,

     $ pulumi import aws:lightsail/instance:Instance gitlab_test 'custom_gitlab'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v5.43.0 (Older version)
    published on Tuesday, Mar 10, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.