How to sell Amazon Lightsail servers from Blesta
Sooner or later a client asks for "a server on AWS". You can send them to the AWS console and lose the sale, or sell it to them yourself. Amazon Lightsail makes the second option realistic. Its plans come as fixed bundles of vCPU, memory, SSD and data transfer, so they fit a Blesta package with a price per term far better than the rest of AWS does.
This guide works through it in the order you'd actually decide things: what you're offering, where each piece lives in Blesta, how a paid order becomes a running server, and which AWS charges keep running when nobody is looking.
Decide the offer first
Before you touch any settings, answer two questions.
Fixed or flexible? A fixed package ("2 GB server, London, Ubuntu") is easy to support and easy to price. A flexible one lets the client pick region, plan and operating system at checkout. Many hosts start fixed and add choice once the first few servers run cleanly.
Managed or self-service? A self-service client wants power buttons, a firewall, snapshots and SSH access. A managed client may only need connection details and usage graphs, while your team handles firewall changes and restores. Hiding a button doesn't remove access the client already has over SSH, so describe the service you actually provide.
Where each piece lives
- The AWS credentials belong to the module. In Blesta that's Settings → Company → Modules, where you manage the installed module and add the account. Blesta stores the secret encrypted, and you can add a second AWS account later.
- The package (Packages → Packages) holds the fixed defaults: platform, region, zone, plan and image, plus which controls the client sees.
- Package options (Packages → Configurable Options) hold the client's choices and what each one costs.
- The service carries the client's own server, with tabs on its page in the client area.
The AWS side: a narrow key and a sensible region
Give Blesta an access key for an IAM user that can do nothing outside Lightsail. Its policy needs read access to Lightsail's bundles, blueprints, regions and instance state, plus the actions you'll really use: create, start, stop, reboot and delete instances, open and close ports, allocate and release static IPs, manage snapshots and key pairs, and create disks if you sell extra storage. Most Lightsail actions can't be limited to particular resources, so the policy uses "Resource": "*". Many hosts keep resold servers in an AWS account of their own for that reason.
For the region, start with where your clients are. Lightsail is offered in a fixed set of AWS regions, and AWS notes that plan specifications can differ between regions, with smaller transfer allowances in Mumbai and Sydney. If you offer a region choice, check every plan you list in every region you list.
Building the package and its options
Create the package with the Lightsail module and your AWS account, then set:
- Platform: Linux/Unix or Windows. Lightsail prices them differently, so keep them in separate packages.
- Region and availability zone.
- Plan (bundle) and image (blueprint). Plans come in dual-stack and IPv6-only versions. Only offer IPv6-only if your clients can actually reach IPv6-only hosts.
- Static IP, if clients need an address that survives a stop and start. Without one, Lightsail gives the server a new public IP when it starts again.
For a flexible package, generate the package options from the live Lightsail catalogue rather than typing them in. AWS retires plans and updates images, and a hand-typed list goes out of date silently. The extras worth offering as options are extra storage, a static IP, automatic daily snapshots and a number of snapshot slots. Each one adds to your AWS bill, so give each one a price under Packages → Configurable Options before the package goes on an order form.
From paid invoice to running server
In Blesta, a paid order becomes a server when the service is activated. That normally happens in the Provision Paid Pending Services task, which runs from Blesta's cron. If the package is set to hold paid services for manual activation, it waits for a member of staff to press Activate instead. If paid services sit in Pending, check the cron and Settings → Company → Automation before suspecting AWS.
Creating the instance is only the first step. Attaching a static IP or a storage disk finishes a few minutes later. Your welcome email should say the server will be ready shortly, not that it's ready now.
What the client's service page should hold
Blesta lets a module add tabs and actions to the client's service page, and that's where a VPS is won or lost:
- status and power: start, stop and reboot, each available only when it makes sense;
- connection details: IPv4 and IPv6 addresses, the SSH user, a downloadable key and a ready-to-paste
sshcommand (RDP details on Windows); - firewall: open and close TCP or UDP ports, or allow ping;
- snapshots: take, restore and delete;
- usage graphs for CPU and network;
- activity, so you and the client can see what happened and when.
A terminal that opens in the browser is a real help to the client who has firewalled themselves out of SSH.
The AWS charges that don't stop
A stopped server still costs money. AWS charges for a Lightsail instance in the stopped state as well as when it's running, and charges end only when it's deleted. Stopping the server is still right for a suspension, because the client's data survives. But a suspended service has to reach cancellation eventually, or you're paying for it indefinitely.
Manual snapshots outlive their server. Snapshot storage is billed per gigabyte for as long as each snapshot exists. Lightsail keeps the latest seven automatic snapshots and deletes them with the instance. Manual snapshots stay in your account after the server is gone. Limit how many a client can keep, and decide what happens to them on cancellation.
An idle static IP bills. A static IP attached to an instance costs nothing extra. One left unattached for more than an hour is charged.
Extra disks are separate. A block storage disk is billed on its own, attached or not, and can't be grown later.
Data transfer is bundled, so price it in. Each plan includes a transfer allowance. Inbound and outbound traffic both count toward it, and AWS charges for outbound traffic to the internet beyond it. Price transfer into the package, and keep an eye on heavy users: the service's usage graphs show network in and out.
Plan changes and cancellations
Lightsail can't resize an instance in place. AWS's route to a bigger server is a snapshot and a new, larger instance built from it, and a snapshot can't be used to build a smaller one. Offer upgrades only to larger plans on the same platform and region. Downgrades mean a fresh server and a migration.
Cancellation should delete the instance and release anything that bills on its own. Run it with Use module ticked, so Blesta asks the module to do the work instead of only closing the service record.
The module we built for this
PD AWS Lightsail is our Blesta module for this. It keeps your AWS accounts under the module's Manage page and generates package options from the live Lightsail catalogue: region, plan, operating system, extra storage, static IP, automatic daily snapshots and snapshot slots. A daily check flags any plan or image AWS has retired, and one click of Sync hides it without touching existing services. Suspension stops the server, unsuspension starts it, and cancellation deletes it and releases its static IP. An upgrade to a larger plan is a data-preserving resize (snapshot, new server, swap) that keeps the zone, firewall rules, SSH key and static IP.
Clients get power, connection details, a firewall, snapshots, usage graphs, an activity log and, when you switch it on, a browser console. Price Analysis shows AWS's price for each plan beside a suggested price at your target margin. The module installs and updates from the PD Modules panel inside Blesta, and an update that fails rolls itself back.
For requirements and screenshots, see the PD AWS Lightsail module page.
This post is part of a series on reselling AWS from Blesta; start with the overview.
Questions about running Lightsail from Blesta are welcome in the comments.
PD Modules is made by Projektif Digital Ltd, the team behind PD Hosting.
原文:https://www.a8q9.cn/en/article/how-to-sell-amazon-lightsail-servers-from-blesta-5bd54c.html