How to LightSail

By: Charlie

Last Revised: 10th October, 2022

Difficulty: Intermediate

Reading Time: 5 minutes

This is a quick 'How to LightSail' guide for members of the LCDS who are thinking of creating an accessible, public facing dashboard. This is a work in progress, and all comments and feedback are welcome! More advanced comments are noted after the enumerated list:

  1. Ensure that you have an account under the institutional LCDS umbrella org (or use your own private account as appropriate).
  2. Ensure that you've already registered the domain name that you want your application to be served to with an appropriate provider (GoDaddy, Route53, or otherwise). We're going to come back to this provider later to change name-servers and authenticate LightSail to take control of what gets shown on this domain.
  3. Navigate yourself to the AWS LightSail console page.
  4. Create yourself an instance of the appropriate size, choosing the operating system that you feel most comfortable with. For most things, relatively smaller tier instances will more than suffice.
  5. Either using the SSH key which it provides, or using their handy in-browser terminal function, log into the instance.
  6. Deploy your application to the instance: this could be from GitHub, and it could optionally be wrapped into one of Doug's awesome Docker containers for easy redeployment.
  7. Ensure that your application is running, and that it's serving to port 80 (or otherwise as appropriate). This instance is otherwise known as the 'Origin'.
  8. Click 'Networking', and create a "Static IP" address.
  9. Next, also in the Networking tab, create a 'Distribution' with the appropriate plan and settings.
  10. Within this distribution, assign your 'Origin' and 'Static IP' to it.
  11. Next, also in the 'Networking' tab, create your 'DNS Zone'.
  12. After you've created your DNS Zone, you need to go back to the place where you registered your domain name (see 2., above), and copy and paste in the four 'nameservers' which it gives you into your domain name provider's portal.
  13. Lets now attach an SSL certificate to authenticate our domain (this allows secure connections over https). Go back to the Distribution you created above (in the 'Networking' tab), and navigate to 'Custom Domains'.
  14. First, create an SSL certificate, noting down the 'Name' and 'Value' in a text editor for easy copy and pasting later. You might very well want to not just create a certificate for '', but also '' (as an 'alternate'): this can be filled in the 'alternative names' field (where the 'www.' acts as a subdomain to the root domain).
  15. Importantly, note here that your 'domain name' e.g. '' cannot be registered as a Distribution in any other part of the AWS infrastructure within or outside of LightSail.
  16. Navigate to the DNS Zone created above, and click on 'Add Record'. This record should be a 'CNAME' type, and here you should copy in the value form step 14. into the 'subdomain' placeholder. This is very important: Do not copy the 'domain' part of your Value. If your Value is '', only copy in '123abc', as LightSail has pre-propagated the domain for you. Copying it all in would result in a subdomain of ''. In the 'Maps to' section, paste in the full 'Name' value of your SSL certificate.
  17. If you've created Value/Name pairs for not just the root domain (e.g, but also for things like '', you should also fill in CNAME entries for these.
  18. This should result in a status on your SSL certificate in your Distribution changing to 'Validation in Progress...', which can take an ambiguous amount of time to actually validate, but usually resolves in 5-30 minutes in my experience.
  19. This should allow us to proceed to the final step: pointing things at our instance. Navigate to the DNS Zone created above, and create 'A' (address) name DNS entries for your root ( and also your subdomains ( Point these at the Distribution which you've created above via the dropdown menu. Again, you might need to wait an ambiguous but short amount of time for your DNS records to propagate across the internet.
  20. Viola! Your application should now be online!

This guide is deliberately introductory. There are an additional number of things that you might want to consider. If there's demand, we can expand this file to discuss such things. These include, but aren't limited to: