1. Introduction & use cases
Amazon Web Services (AWS) is the largest cloud platform, with 200+ services for compute, storage, databases, networking, machine learning and more, available in regions around the world (including Mumbai, ap-south-1, and Hyderabad, ap-south-2, in India). You pay for what you use.
The most important first steps are security (MFA, no daily use of the root user, least-privilege access) and cost control (budgets and alerts). Then pick services: EC2 for servers, S3 for files, RDS for databases, CloudFront for CDN and Lambda for serverless code.
Where it is used
- Hosting websites, APIs and mobile back-ends
- Storing files, backups and media at any scale
- Managed databases, caches and queues
- Serverless and container platforms (Lambda, ECS, EKS)
2. Prerequisites
| You need | Version / notes |
|---|---|
| Email + phone | For account sign-up and verification |
| Payment card | Required even for free usage (Indian accounts may be billed by AWS India) |
| Authenticator app | For multi-factor authentication (MFA) |
| Terminal | For the AWS CLI |
3. Local setup
1Create the account and secure the root user
Sign up at aws.amazon.com. Immediately enable MFA on the root user (IAM → Security credentials) and do not create root access keys. Use the root user only for account-level tasks.
2Create an admin identity for daily work
Recommended: IAM Identity Center → enable → create a user → assign the
AdministratorAccesspermission set to your account. You will sign in through the AWS access portal URL it shows. (Small/personal setups can use an IAM user with MFA instead.)3Install AWS CLI v2
Windows: run the MSI. macOS: the .pkg installer. Linux:
BASHcurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip unzip awscliv2.zip sudo ./aws/install aws --version # Windows (PowerShell) msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi4Configure the CLI
With Identity Center use SSO (short-lived credentials, nothing secret saved on disk).
BASHaws configure sso # SSO start URL: https://d-xxxxxxxxxx.awsapps.com/start # SSO region: ap-south-1 # choose account + role, CLI default region: ap-south-1, profile name: dev aws sso login --profile dev aws sts get-caller-identity --profile dev
4. Create & run a project
1Set a budget alert first
Billing and Cost Management → Budgets → Create budget → “Monthly cost budget”, e.g. $10, with email alerts at 80% and 100%. Also check the current Free Tier offer for your account (AWS changed the Free Tier for new accounts in 2025).
2Create your first resource with the CLI
An S3 bucket (names are globally unique) and a test upload.
BASHexport AWS_PROFILE=dev aws s3 mb s3://my-first-bucket-$RANDOM --region ap-south-1 aws s3 ls echo "hello aws" > hello.txt aws s3 cp hello.txt s3://YOUR_BUCKET/ aws s3 ls s3://YOUR_BUCKET/3Explore regions and services
Pick one region close to your users for most resources. Some global services (CloudFront certificates, IAM) are special – see their guides.
BASHaws ec2 describe-regions --query "Regions[].RegionName" --output table4Clean up
Delete test resources so they do not cost money.
BASHaws s3 rb s3://YOUR_BUCKET --force
✅ When it works you should see output like Figure 1.
5. Development configuration
Environment variables
The CLI and SDKs read credentials from profiles (~/.aws/config) or environment variables. On AWS compute (EC2, Lambda, ECS) use IAM roles instead of access keys.
AWS_PROFILE=dev
AWS_REGION=ap-south-1
# Avoid long-lived keys; if you must use them:
# AWS_ACCESS_KEY_ID=...
# AWS_SECRET_ACCESS_KEY=...Key dependencies
| Package / tool | Used for |
|---|---|
AWS CLI v2 | Command-line access |
AWS SDKs | boto3 (Python), @aws-sdk/* (JavaScript v3), AWS SDK for Go/Java/PHP |
IAM / Identity Center | Users, roles and permissions |
AWS Budgets / Cost Explorer | Cost tracking and alerts |
CloudTrail | Audit log of API calls |
IaC tools | CloudFormation, AWS CDK, Terraform, SAM |
Folder structure
~/.aws/
├── config # profiles, regions, SSO settings
└── credentials # only if you use access keys
infra/ # in your repo
├── cdk/ or terraform/
└── README.mdEssential commands
| Command | What it does |
|---|---|
aws configure sso / aws sso login | Set up and refresh SSO credentials |
aws sts get-caller-identity | Who am I? |
aws <service> help | Built-in documentation |
--profile NAME --region CODE | Choose account/region per command |
--output table|json|text | Output format |
--query "…" | Filter output (JMESPath) |
6. Production deployment
There is no single “AWS deployment” – choose the service that fits the app. A typical small production setup:
Server & hosting requirements
| Requirement | Recommendation |
|---|---|
| Static site / SPA | S3 + CloudFront + ACM certificate |
| API / full app on a server | EC2 (or Lightsail) + Nginx + SSL |
| Database | RDS in private subnets |
| Serverless functions | Lambda + API Gateway / Function URLs |
| Containers at scale | ECS Fargate or EKS (Kubernetes) |
| Domain | Route 53 or your registrar’s DNS |
Deployment steps
1Separate environments
Use separate AWS accounts (AWS Organizations) or at least separate stacks/tags for dev, staging and production.
2Use roles, not keys
Give EC2/Lambda/ECS an IAM role with only the permissions they need; give CI a role through OIDC (see GitHub Actions).
3Turn on auditing and alerts
Enable CloudTrail for the account, keep the budget alerts, and create CloudWatch alarms for key metrics (CPU, errors, 5xx).
4Describe infrastructure as code
Keep CloudFormation/CDK/Terraform files in Git so environments are reproducible and reviewed.
BASH# AWS CDK example npm install -g aws-cdk cdk init app --language typescript cdk bootstrap cdk deploy5Point your domain
Create a Route 53 hosted zone (or use your registrar’s DNS) and add records to your CloudFront distribution, load balancer or Elastic IP.
🗺 The whole path from your code to the live site is drawn in the deployment diagram.
7. Images & screenshots
Illustrations drawn for this guide from the commands above. Product dashboards change often, so for screens such as cloud consoles follow the step text and the official documentation.
8. Common errors & solutions
Unable to locate credentials
Run aws sso login --profile NAME (or aws configure), and pass --profile or set AWS_PROFILE.
An error occurred (AccessDenied)
The identity lacks permission for that action/resource. Check its policies (IAM policy simulator helps).
Resources “disappeared”
You are looking at another region in the console or CLI. Switch region (top-right) or pass --region.
Unexpected bill
Check Cost Explorer by service and region; common causes are running instances, NAT gateways, unattached Elastic IPs and snapshots. Set budgets before experimenting.
The security token included in the request is expired
SSO credentials are short-lived – run aws sso login again.
Best practices
- MFA everywhere; never use the root user for daily work.
- Least-privilege IAM; roles instead of access keys.
- Budgets and alerts from day one.
- One main region near your users (e.g. ap-south-1 for India).
- Tag resources (project, env, owner) to track costs.