appzasGamesToolsDevLearnCheat sheetsQuick calcsConvertersReferenceNetworkTimeCalculatorsCompareLLM prices

Costs and safety habits

Lesson 5 of 59 minBeginner

Set budgets, tag resources and clean up so a test never becomes a surprise bill.

AWS bills for usage. A forgotten resource keeps costing money, and a leaked key can run up a large bill in hours. A few habits prevent most surprises.

Before you build anything

  1. Turn on MFA for the root user and stop using it.
  2. Create an AWS Budget with an alert by email at a low amount.
  3. Use IAM Identity Center or an IAM user for daily work.
  4. Choose one region and stay there while learning.

Common cost traps

  • Instances left running and unattached disks (EBS volumes) that remain after you delete an instance.
  • Elastic IP addresses that are not attached to a running instance.
  • NAT gateways, which bill by the hour plus data processed.
  • Data transfer out to the internet and between regions.
  • Load balancers and managed databases that run all day.

Keep track

Add tags such as project=blog and owner=ana to everything. Cost Explorer can then show the spend per project. Delete what you create for tests the same day.

CarefulIf an access key leaks, deactivate it immediately, review the account for resources you did not create and rotate every secret that the key could read.

NotePrices differ by region and change over time. Use the AWS Pricing Calculator for estimates instead of remembering numbers.

Test yourself

Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.

1. What is the first thing to set up to avoid a surprise bill?
2. What often keeps costing money after you delete an instance?
3. Why tag resources?

Key terms