• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

AWS CLI Lightsail

May 19, 2019

Get instance details

aws lightsail get-instance --instance-name your-server

aws lightsail get-instance --instance-name your-server

Get instance state

aws lightsail get-instance-state --instance-name your-server

aws lightsail get-instance-state --instance-name your-server

Create a snapshot

aws lightsail create-instance-snapshot \
--instance-snapshot-name your-server-new-snapshot-201905192200 \
--instance-name your-server

aws lightsail create-instance-snapshot \ --instance-snapshot-name your-server-new-snapshot-201905192200 \ --instance-name your-server

Create disk from snapshot

aws lightsail create-disk-from-snapshot \
--disk-name your-server-new-boot-disk \
--disk-name your-server-new-snapshot-201905192200 \
--availability-zone us-east-1a
--size-in-gb 50

aws lightsail create-disk-from-snapshot \ --disk-name your-server-new-boot-disk \ --disk-name your-server-new-snapshot-201905192200 \ --availability-zone us-east-1a --size-in-gb 50

Attach Disk

aws lightsail attach-disk \
--disk-name your-server-new-boot-disk \
--instance-name your-server \
--disk-path /dev/sda1

aws lightsail attach-disk \ --disk-name your-server-new-boot-disk \ --instance-name your-server \ --disk-path /dev/sda1

Create instance from snapshot

aws lightsail create-instance-snapshot \
--instance-snaphot-name your-server-new-snapshot-201905192200
--instance-name your-server

aws lightsail create-instance-snapshot \ --instance-snaphot-name your-server-new-snapshot-201905192200 --instance-name your-server

Attach Static IP Address

aws lightsail attach-static-ip \
--static-ip-name your-ip-name \
--instance-name your-server

aws lightsail attach-static-ip \ --static-ip-name your-ip-name \ --instance-name your-server

Filed Under: Cloud, Linux Tagged With: attach, aws, cli, instance, lightsail, snapshot, static ip

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023