When does Lightsail Container Service fit a web app?
Use this AWS option when your app already runs in a compatible container image, a package with the files and instructions it needs to start. Lightsail runs the container. You choose the part that receives web requests and the port it listens on.
To upload your own image to Lightsail, the documented path uses the AWS command-line tool and the Lightsail Control plugin. Before choosing this service, check the image’s platform and startup requirements and confirm the app responds on the same port you will configure for its web endpoint.
How can you tell which container version is running?
Do this on paper or with two disposable local versions of a fake opening-hours page. Before you run either locally, confirm the image and its settings contain no real credentials, customer data or connections to live services. Keep it local and stay on paper if you cannot verify the setup.
- Keep one version that worksGive version A a distinct image label. Record its web port and make a simple health page that answers without a database. Check that the local shop page says it closes at 4 p.m.
- Change one thing and check both pagesGive version B a different image label and change closing time to 5 p.m. Stop A before starting B on the same local address. Open the page and check the new time. Open the health path separately to check that it still responds.
- Practice returning to the original imageStop B and start the recorded version A image again in the disposable setup. Check that the page says 4 p.m. and the health path answers. On paper, match the expected response to each image label.
How does Lightsail bring back a previous app version?
A Lightsail container service has one active deployment. AWS keeps the latest 50 deployment configurations for that service. You can use one to create a new deployment, provided the image and anything the app needs to start are still available.
A deployment configuration records which containers run and how to reach them. If a later hosted test needs its own address while the live version stays active, plan a separate service with isolated settings. That service has its own charge.
What can keep costing money when nobody visits?
Lightsail charges for the container service based on the size and number of nodes, the computing units that run it. An empty or disabled service still accrues charges. AWS bills by the hour up to the service’s monthly price for the chosen capacity. An early deletion leaves a prorated bill for that month.
| Cost | What to look up |
|---|---|
| Container service | Check the node size, node count and time the service exists. Include any separate test service. |
| Data transfer | Compare expected transfer with the service allowance. Excess outbound charges depend on the route and Region. |
| Connected services | Price the actual database, storage and retained backups separately. Check which resources remain if you retire the web service. |
What should you keep to recover or move the app?
Keep the source, build instructions, the image or a way to reproduce it, the port and health path, and a list of settings the app expects. Keep the setting values that grant access in your secret store. Put shared customer records in a separate durable database.
Redeploying an older container starts older app code. Deleting the Lightsail service also removes its stored images and deployment history. Recover the database and uploaded files through their own backup paths. If you use Amazon RDS, verify which backups can restore the instance and which export format a new host can import. An RDS snapshot exported to Amazon S3 is intended for data analysis. A supported RDS snapshot can restore to a new RDS instance. For a move, test an export the replacement database can import.
For any recovery rehearsal, confirm a separate empty practice destination with test-only access. Restore only sample records, reconnect the practice app and check that one record and its files still open.