Skip to content
COL0

How to deploy your application on AWS without getting lost (EC2, Lightsail and S3)

AWS has more than 200 services and it is easy to freeze up or overspend. For your first app you only need to understand three or four.

Written by Victor Barrera

Which service to use for your case

  • Lightsail: a fixed-price server for a simple website or API. The best entry point.
  • EC2: configurable virtual machines when you need more control or expect to grow.
  • S3: file storage (images, documents, backups). Very cheap and reliable.
  • RDS: a managed database, with automatic backups, when you do not want to operate it yourself.

The steps, in short

  1. Secure your account first: enable two-step verification, do not use the root account day to day, and create an IAM user with minimal permissions.
  2. Create a budget with spending alerts.
  3. Launch the server (Lightsail or EC2) with Linux and assign it a static IP.
  4. Configure the firewall (security groups): open only ports 22, 80 and 443, and limit 22 to your IP if you can.
  5. Deploy your app as on any VPS: proxy, HTTPS and a service that restarts by itself.
  6. Store files in S3 with the bucket private; share with signed URLs instead of making it public.
  7. Enable backups (disk and database snapshots).

Common mistakes

  • Accidentally leaving an S3 bucket public.
  • Storing access keys in the GitHub repository.
  • Opening the database to the whole internet (0.0.0.0/0).
  • Forgetting to shut down test resources and finding out on the bill.

How we help

We help you pick the cheapest service that covers your need, leave the account secure and deploy your app with backups and spending alerts.

Frequently asked questions

EC2 or Lightsail?

Lightsail is a server with a fixed monthly price and a simple console, ideal to start. EC2 gives more control and options, but requires understanding networking, disks and costs separately.

How do I avoid unexpected AWS charges?

Create a budget with alerts (AWS Budgets) on day one, delete resources you do not use and do not leave paid services running after a test.

Ready to publish your project?

Book your free 30-minute session and leave with a clear plan.

Book your free session