Skip to content

[bug] Lightsail relational databases are not being listed or nuked #705

@Yu-yunjong

Description

@Yu-yunjong

Description

When running aws-nuke v3.56.2 against multiple AWS accounts (e.g. 277707125173 and others) in the ap-northeast-2 region, Lightsail instances are correctly listed and targeted for deletion, but relational databases (LightsailDatabase) are never listed in the scan. Although these databases can be listed and deleted using the AWS SDK for Go (v1/v2) or boto3, aws-nuke appears to skip them entirely as if they do not exist.

Steps to Reproduce

  1. Download the aws-nuke binary and make it executable:
    wget https://github.com/rebuy-de/aws-nuke/releases/download/v3.56.2/aws-nuke-v3.56.2-linux-amd64.tar.gz
    tar xzf aws-nuke-v3.56.2-linux-amd64.tar.gz
    chmod +x aws-nuke
  2. Create a config.yml:
    regions:
      - ap-northeast-2
    
    blocklist:
      - "000000000000"
    
    accounts:
      "277707125173": {}  # Tested on multiple account IDs with the same result
  3. Run a no-dry-run:
    ./aws-nuke run --config config.yml --no-dry-run
  4. Observe that no LightsailDatabase resources appear in the output, even though:
    • The same accounts and region have relational databases visible via aws lightsail get-relational-databases or Go SDK code.
    • Lightsail instances are listed and deleted normally by aws-nuke.

Expected Behavior

  • All Lightsail relational databases in ap-northeast-2 should be listed under the LightsailDatabase resource type.
  • With --no-dry-run, those databases should be deleted just like other Lightsail resources.

Environment

  • aws-nuke version: v3.56.2 (commit 37ea112)
  • AWS SDKs tested: Go SDK v1/v2 and Python boto3 can list/delete the same databases successfully.
  • Region: ap-northeast-2 (Seoul)
  • Accounts tested: Multiple, all exhibit the same behavior.

Additional Notes

When searching the aws-nuke documentation for “lightsail”, only the following resource types are mentioned:

  • Lightsail Disk
  • Lightsail Domain
  • Lightsail Instance
  • Lightsail Key Pair
  • Lightsail Load Balancer
  • Lightsail Static Ip

There is no mention of relational databases (LightsailDatabase). Could this omission be intentional (i.e., support has not been added), or is this another bug?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions