AWS Tutorial menu

AWS Account and Free Tier

Before you can use any AWS service, you need an AWS account, and you should protect it from day one.

Creating an AWS Account

To sign up you need:

  • An email address that you check often
  • A phone number for verification
  • A debit or credit card (many Pakistani bank cards work if online international payments are turned on)

The steps are:

  1. Go to the AWS website and click Create an AWS Account
  2. Enter your email and an account name, for example ayesha-learning
  3. Verify your email and choose a strong password
  4. Enter your contact details and card details
  5. Verify your phone number with an SMS code
  6. Choose the Basic support plan, which is free

AWS may charge a very small amount (about 1 US dollar) to check the card, and then return it.

The Root User

The email and password you signed up with belong to the root user. The root user can do everything, including closing the account and changing payment details.

Because it is so powerful:

  • Turn on multi-factor authentication (MFA) for the root user straight away
  • Do not use the root user for daily work
  • Create a normal IAM user for yourself instead (you will learn this in the IAM chapter)

Never create access keys for the root user. If those keys leak, an attacker controls your whole account.

The AWS Free Tier

AWS offers a Free Tier so you can learn without paying. It has three kinds of offers:

KindWhat it meansExample
Free trialsShort trials of some servicesA free trial of a monitoring service
12 months freeLimited free use for the first yearSmall EC2 server hours each month
Always freeSmall free limits that never end1 million Lambda requests per month

The exact limits change over time, so always check the Free Tier page before you start a service. Use the smallest options (for example t2.micro or t3.micro servers) when learning.

Setting a Budget Alert

The most important thing a beginner can do is create a budget. AWS will email you when your spending goes over a limit.

In the console: Billing and Cost Management then Budgets then Create budget, and choose the Zero spend budget template. You get an email as soon as you spend even one cent.

You can also create a budget from the CLI. First save this as budget.json:

Example

json
{
  "BudgetName": "monthly-5-dollars",
  "BudgetLimit": { "Amount": "5", "Unit": "USD" },
  "TimeUnit": "MONTHLY",
  "BudgetType": "COST"
}

Then run:

Example

bash
aws budgets create-budget --account-id 123456789012 --budget file://budget.json

Installing and Configuring the AWS CLI

The AWS CLI lets you control AWS from your terminal. After installing it from the AWS website, check the version:

Example

bash
aws --version
Output
aws-cli/2.17.0 Python/3.11.8 Windows/10 exe/AMD64

Then connect it to your account with an IAM user's access key:

Example

bash
aws configure
Output
AWS Access Key ID [None]: AKIAEXAMPLEKEY
AWS Secret Access Key [None]: ****************
Default region name [None]: ap-south-1
Default output format [None]: json

Keep your access keys secret. Never put them in code that you upload to GitHub. Bots scan GitHub for leaked AWS keys within minutes.

Cleaning Up

When you finish a lesson, delete what you created: stop or terminate servers, delete databases and empty buckets you do not need. Many surprise bills come from a forgotten server running for a month.

Exercise

Exercise

What is the best way to avoid a surprise AWS bill while learning?

Learn AWS with a teacher

Join the CIT (Computer Information Technology) course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp