Files
floci/docs/services/lightsail.md
T
kotov228 97b64a1d3b feat: add AWS Lightsail emulation (#1583)
* feat(lightsail): add AWS Lightsail emulation

* fix(lightsail): align error responses with AWS

* fix(lightsail): address review edge cases

* fix(lightsail): reject attached disk reattach

* fix(lightsail): reject static ip reattach

* fix: register lightsail docs handler
2026-07-10 20:43:42 -05:00

2.0 KiB

Amazon Lightsail

Floci exposes Amazon Lightsail through the AWS JSON 1.1 protocol:

  • Endpoint: POST /
  • Target prefix: Lightsail_20161128.*
  • Signing name: lightsail

The local implementation keeps Lightsail state in Floci storage and is designed for SDK and AWS CLI compatibility on common development workflows.

Supported local workflows

  • Instances: create, get, list, start, stop, reboot, delete, state lookup, and public port management
  • Disks: create, get, list, attach, detach, and delete
  • Static IPs: allocate, get, list, attach, detach, and release
  • Key pairs: create, import, get, list, delete, and download default key pair
  • Discovery: regions, blueprints, bundles, active names, operations, and operations for resource
  • Tags: tag and untag local Lightsail resources

Read-only list operations for cloud-side Lightsail resource families that are not locally implemented yet return empty AWS-shaped lists. Cloud-only provisioning workflows such as container services, distributions, managed databases, load balancers, buckets, and snapshots are recognized from the AWS Lightsail API model and return an explicit UnsupportedOperation error instead of a custom endpoint or non-AWS response shape.

Examples

aws --endpoint-url http://localhost:4566 lightsail get-blueprints
aws --endpoint-url http://localhost:4566 lightsail create-instances \
  --instance-names web-a \
  --availability-zone us-east-1a \
  --blueprint-id ubuntu_22_04 \
  --bundle-id nano_3_0
aws --endpoint-url http://localhost:4566 lightsail allocate-static-ip \
  --static-ip-name web-ip

aws --endpoint-url http://localhost:4566 lightsail attach-static-ip \
  --static-ip-name web-ip \
  --instance-name web-a

Persistence

Lightsail resources use StorageFactory and follow the global storage mode by default. Configure the service with:

floci:
  services:
    lightsail:
      enabled: true
  storage:
    services:
      lightsail:
        flush-interval-ms: 5000