LinuxCommandLibrary

aws-lightsail

Manage AWS Lightsail resources

TLDR

List all virtual private servers, or instances

$ aws lightsail get-instances
copy

List all bundles (instance plans)
$ aws lightsail list-bundles
copy

List all available instance images, or blueprints
$ aws lightsail list-blueprints
copy

Create an instance
$ aws lightsail create-instances --instance-names [name] --availability-zone [region] --bundle-id [nano_2_0] --blueprint-id [blueprint_id]
copy

Print the state of a specific instance
$ aws lightsail get-instance-state --instance-name [name]
copy

Stop a specific instance
$ aws lightsail stop-instance --instance-name [name]
copy

Delete a specific instance
$ aws lightsail delete-instance --instance-name [name]
copy

SYNOPSIS

aws lightsail <subcommand> [<global-options>] [<args>]

PARAMETERS

--debug
    Turn on debug logging.

--endpoint-url TEXT
    Override default URL with custom endpoint.

--no-verify-ssl
    Disable SSL certificate verification.

--cli-binary-format TEXT
    raw-in-base64-out|raw-binary|raw output format.

--no-cli-pager
    Disable paging of output.

--cli-auto-prompt
    Automatically prompt for input parameters.

--no-cli-auto-prompt
    Disable automatic prompting.

--region TEXT
    AWS region (e.g., us-east-1).

--output TEXT
    Output format: json|text|table.

--query TEXT
    JMESPath query for response filtering.

--profile TEXT
    Named profile from credentials file.

--help
    Display help for command/subcommands.

DESCRIPTION

The aws lightsail command is part of the AWS Command Line Interface (CLI) for interacting with Amazon Lightsail, a simplified VPS and cloud platform offering compute instances, managed databases, block storage, load balancers, CDN distributions, and DNS zones. It enables programmatic management of Lightsail resources, including creating/deleting instances, snapshots, disks, static IPs, VPC peering, SSL certificates, blueprints, and bundles.

Key use cases include launching pre-configured servers (Linux/Windows), monitoring metrics/alarms, opening firewall ports, tagging resources, exporting snapshots to EC2, and handling networking. Output supports JSON, text, table, or YAML formats with JMESPath querying for automation. Lightsail emphasizes ease-of-use with predictable pricing versus EC2's flexibility.

Requires AWS CLI v2 installed, credentials configured via aws configure, and IAM policies permitting Lightsail actions (e.g., lightsail:*). Regions are limited compared to other services; default is account-specific. Ideal for developers, small apps, and quick deployments via scripts or CI/CD.

CAVEATS

Limited to Lightsail-supported regions; requires IAM permissions; no support for custom AMIs (use blueprints/bundles); fixed pricing model.

COMMON SUBCOMMANDS

create-instance, stop-instance, get-instances, create-snapshot, open-instance-public-ports, attach-disk, get-regions. Full list: aws lightsail help.

INSTALLATION

Install AWS CLI v2 from aws.amazon.com/cli; configure with aws configure.

HISTORY

Launched 2016 at AWS re:Invent for simplified VPS; CLI integration from v1.11+; expanded with databases (2019), Windows support (2020), larger instances (2023).

SEE ALSO

aws(1)

Copied to clipboard