Skip to main content

AWS Lightsail: Notes

AWS Lighsail Logo

One of ways to learn AWS is start with https://aws.amazon.com/lightsail/, first month is free.

List of services on AWS Lightsail:

  • Instances
  • Containers
  • Databases
  • Networking
  • Storage
  • Snapshots
AWS Lightsail services

Databases

aws lightsail get-relational-database --relational-database-name dbname-here --profile profile-here

PS F:\Projects\github\spring-jpa-h2> F:\xampp\mysql\bin\mysql.exe -u dbmasteruser -h ls-01873f09d6081824bab0192b883ef5308f7e2d73.ckcgqkvrumsn.us-east-1.rds.amazonaws.com -p
Enter password: ********************************
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 6065
Server version: 8.0.23 Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| dbmaster           |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.375 sec)

MySQL [(none)]>

Setup AWS Lightsail Instance for Cloud9

sudo apt install nodejs npm -y
aws lightsail get-instance --instance-name instancename-here --profile profile-here
PS C:\Users\tuyen> aws lightsail delete-instance --instance-name WordPress_Multisite-1 --profile PROFILE-NAME-HERE --region ap-southeast-2
{
    "operations": [
        {
            "id": "448a6332-1cdd-4151-ad70-eb5c8a1acac6",
            "resourceName": "4e17d509-b746-4a41-91b6-04c63467e470",
            "resourceType": "Alarm",
            "createdAt": "2023-11-08T21:57:57.967000+07:00",
            "location": {
                "availabilityZone": "all",
                "regionName": "ap-southeast-2"
            },
            "isTerminal": true,
            "operationDetails": "WordPress_Multisite-1",
            "operationType": "DeleteAlarm",
            "status": "Succeeded",
            "statusChangedAt": "2023-11-08T21:57:57.967000+07:00"
        },
        {
            "id": "5cc7c719-b605-4bf7-80d1-caf780aae459",
            "resourceName": "WordPress_Multisite-1",
            "resourceType": "Instance",
            "createdAt": "2023-11-08T21:57:58.450000+07:00",
            "location": {
                "availabilityZone": "ap-southeast-2a",
                "regionName": "ap-southeast-2"
            },
            "isTerminal": true,
            "operationDetails": "",
            "operationType": "DeleteInstance",
            "status": "Succeeded",
            "statusChangedAt": "2023-11-08T21:57:58.450000+07:00"
        }
    ]
}

PS C:\Users\tuyen>
PS C:\Users\tuyen> aws lightsail delete-instance --instance-name Ghost-1 --profile PROFILE-NAME-HERE
{
    "operations": [
        {
            "id": "f0838a18-8c81-441f-bddf-07e2e0f8f0d5",
            "resourceName": "Ghost-1",
            "resourceType": "Instance",
            "createdAt": "2024-09-23T11:18:42.894000+07:00",
            "location": {
                "availabilityZone": "us-east-1a",
                "regionName": "us-east-1"
            },
            "isTerminal": true,
            "operationDetails": "",
            "operationType": "DeleteInstance",
            "status": "Succeeded",
            "statusChangedAt": "2024-09-23T11:18:42.894000+07:00"
        }
    ]
}

PS C:\Users\tuyen>

PS C:\Users\tuyen> aws lightsail get-relational-databases --region us-east-1 --profile PROFILE-NAME-HERE
PS C:\Users\tuyen> aws lightsail delete-relational-database --relational-database-name RELATIONAL-DB-NAME-HERE --region us-east-1 --profile PROFILE-NAME-HERE

Popular posts from this blog

Linux command: lastlog

lastlog command reports the most recent login of all users or of a given user. NAME lastlog - reports the most recent login of all users or of a given user SYNOPSIS lastlog [options] DESCRIPTION lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd. OPTIONS The options which apply to the lastlog command are: -b, --before DAYS Print only lastlog records older than DAYS. -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -t, --time DAYS Print the lastlog records more recent than DAYS. -u, --user LOGIN|RANGE Print the ...

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...