AWS Account Setup and First EC2 Deployment Guide
AWS Account Setup and First EC2 Deployment Guide
Amazon Web Services (AWS) commands the largest market share among global cloud providers, spanning 32 geographic regions and over 100 Availability Zones. Whether you are an individual developer or an enterprise operations team, mastering the fundamentals of AWS is your first step into the cloud. This guide takes you from account registration through launching and connecting to your first EC2 instance.
Step 1: AWS Account Registration
1.1 What You Need
Before registering, make sure you have the following:
- Email address: A corporate email is recommended for team management
- Phone number: Supports international numbers including China mainland
- International credit card: Visa or Mastercard that supports USD billing
- Identity information: Personal or business details for billing address verification
1.2 Registration Steps
- Visit aws.amazon.com and click "Create an AWS Account"
- Enter your email, account name, and password
- Choose account type: Professional (business) or Personal
- Fill in contact information and billing address
- Enter credit card details β AWS will place a $1 authorization hold
- Complete phone number verification
- Select a support plan: Basic Support (free) is sufficient for getting started
Once registered, you automatically qualify for the 12-month Free Tier.
1.3 AWS Free Tier Overview
| Service | Free Allowance | Duration | |---------|---------------|----------| | EC2 | 750 hours/month (t2.micro or t3.micro) | 12 months | | S3 | 5GB standard storage | 12 months | | RDS | 750 hours/month (db.t2.micro) | 12 months | | CloudFront | 1GB data transfer out/month | 12 months | | Lambda | 1 million requests/month | Always free |
Step 2: IAM Security Configuration
AWS follows the principle of least privilege. Using the Root account for daily operations is strongly discouraged. Creating IAM users is a critical security step.
2.1 Create an Admin IAM User
- Sign in to the AWS Console, search for "IAM" and navigate to the IAM dashboard
- Click Users > Create User
- Enter a username (e.g., admin), check "Provide user access to the AWS Management Console"
- Set a console password
- Attach the "AdministratorAccess" policy
- Confirm and save the login credentials
2.2 Enable MFA (Multi-Factor Authentication)
Enable MFA for both your Root account and IAM admin user:
- In IAM, select the user > Security Credentials
- Click "Assign MFA device"
- Choose "Authenticator app" β Google Authenticator or Authy recommended
- Scan the QR code and enter two verification codes to complete setup
2.3 IAM Best Practices
| Practice | Description | |----------|-------------| | Disable Root access keys | Delete Root AK/SK; use IAM users instead | | Rotate keys regularly | Change Access Keys every 90 days | | Use IAM Roles | Assign roles to EC2 instances instead of hardcoding keys | | Enable CloudTrail | Log all API calls for auditing |
Step 3: Launch Your First EC2 Instance
3.1 Choose an AMI
Navigate to the EC2 console and click "Launch Instance":
- Amazon Linux 2023 or Ubuntu 22.04 LTS recommended
- Community AMIs also offer CentOS, Debian, and other options
3.2 Select an Instance Type
| Instance Type | vCPU | Memory | On-Demand Price (US-East) | Use Case | |--------------|------|--------|--------------------------|----------| | t3.micro | 2 | 1GB | $0.0104/hr | Dev/testing | | t3.small | 2 | 2GB | $0.0208/hr | Small web apps | | t3.medium | 2 | 4GB | $0.0416/hr | Medium apps | | m5.large | 2 | 8GB | $0.096/hr | Production | | c5.large | 2 | 4GB | $0.085/hr | Compute-intensive |
New users can choose t3.micro and stay entirely within the Free Tier.
3.3 Configure Instance Details
- Network: Select the default VPC
- Subnet: Choose a public subnet (auto-assign public IP)
- IAM Role: Assign a role if the instance needs access to S3 or other AWS services
3.4 Configure Storage
- Default 8GB gp3 volume; Free Tier allows up to 30GB
- gp3 delivers 3,000 IOPS and 125MB/s throughput β better value than gp2
3.5 Configure Security Group
A security group acts as a virtual firewall. At minimum, configure these rules:
| Protocol | Port | Source | Description | |----------|------|--------|-------------| | SSH | 22 | Your IP | Remote access | | HTTP | 80 | 0.0.0.0/0 | Web traffic | | HTTPS | 443 | 0.0.0.0/0 | Secure web traffic |
Security tip: Never open SSH port 22 to 0.0.0.0/0 β always restrict it to your actual IP address.
3.6 Key Pair
Create a new key pair (ED25519 recommended), download the .pem file, and store it securely. If you lose this key, you will not be able to connect to your instance.
Step 4: Connect to Your EC2 Instance
4.1 SSH from Linux/Mac
chmod 400 your-key.pem
ssh -i your-key.pem ec2-user@<your-public-ip>
The default username is ec2-user for Amazon Linux and ubuntu for Ubuntu AMIs.
4.2 SSH from Windows
Using Windows Terminal or PowerShell:
ssh -i .\your-key.pem ec2-user@<your-public-ip>
You can also use EC2 Instance Connect or Systems Manager Session Manager for browser-based access.
Step 5: Multi-Cloud Integration
As the world's largest cloud platform, AWS integrates with Alibaba Cloud, Tencent Cloud, and GCP for multi-cloud strategies:
- AWS Direct Connect + Alibaba Cloud Express Connect: Hybrid cloud dedicated connections
- AWS S3 + Tencent COS cross-region replication: Disaster recovery
- AWS EKS + GCP GKE: Cross-cloud Kubernetes federation
Cost Control Essentials
AWS on-demand pricing can add up quickly. Here are key strategies to save:
- Savings Plans: Commit to 1 or 3 years of compute usage β save up to 72%
- Reserved Instances: Up to 72% discount vs. on-demand
- Spot Instances: Ideal for fault-tolerant workloads β up to 90% off
- AWS Budgets: Set spending alerts to avoid bill surprises
- Trusted Advisor: Use free-tier optimization tips to identify idle resources
Conclusion
The core workflow from AWS registration to your first EC2 instance is: register account β configure IAM security β launch EC2 β connect via SSH. Properly configuring security groups and IAM is foundational for any production environment β treat these steps with care.
If you are evaluating AWS or planning a multi-cloud deployment, Duoyun Cloud offers exclusive AWS partner discounts β new users can receive up to 12% off their first purchase. We provide full-lifecycle services from account setup and cost optimization to multi-cloud architecture design. Visit duoyun.io to learn more.
Need Professional Cloud Consulting?
Our cloud architect team will customize the best solution for you β free
Free Consultation