AWS EC2
本文缩写(英文全称与中文含义)
| 缩写 | 英文全称/名称 | 中文含义 |
|---|---|---|
| API | Application Programming Interface | 应用程序编程接口 |
| AWS | Amazon Web Services | 亚马逊云服务 |
| CPU | Central Processing Unit | 中央处理器 |
| EBS | Elastic Block Store | AWS 块存储服务 |
| EC2 | Elastic Compute Cloud | AWS 云服务器服务 |
| ECS | Elastic Container Service | AWS 容器编排服务 |
| ENI | Elastic Network Interface | AWS 弹性网络接口 |
| GPU | Graphics Processing Unit | 图形处理器 |
| IAM | Identity and Access Management | 身份与访问管理 |
| IMDS | Instance Metadata Service | 实例元数据服务 |
| OS | Operating System | 操作系统 |
| SSH | Secure Shell | 安全远程登录协议 |
| SSM | AWS Systems Manager | AWS 系统管理服务;SSM 是沿用的简称 |
| VM | Virtual Machine | 虚拟机 |
Links#
- Amazon EC2 User Guide
- Amazon EC2 instance types
- Amazon EBS User Guide
- Amazon EC2 instance metadata
- AWS Systems Manager Session Manager
1. Important Points#
EC2 是 AWS 最基础的 compute service。它适合需要完整 OS control、custom runtime、host-level agent、legacy workload、特殊网络或存储形态的场景。
EC2 用来做:
run VM workload
run self-managed container / Kubernetes / database
host legacy application
use GPU / local NVMe / high network instance type
build bastion, runner, test box, rescue host
EC2 不适合:
不想管理 OS patching
不想处理 instance lifecycle
application 可以直接跑在 ECS / Lambda / App Runner
workload 不需要 host-level control核心原则:
SSM 登录依赖实例身份、Agent 和网络 endpoint;EC2 显示 running 不代表远程管理路径已可用。
access first:
Session Manager or SSH fallback must work
instance profile must be attached
IMDS and SSM endpoint access must be healthy
state and recovery:
root volume snapshot before risky change
data volume separated from root volume when possible
rescue process documented
operations:
monitor CPU, memory, disk, status check, network
keep CloudWatch Agent / SSM Agent healthy
avoid auto-starting risky containers before access is verified2. Common Topics#
| Topic | Notes |
|---|---|
| Access | Session Manager, SSH, EC2 Instance Connect |
| Instance Profile | IAM role for AWS API access from the instance |
| IMDS | Metadata and temporary credentials |
| EBS | Root volume, data volume, snapshot, attach/detach |
| User Data | Bootstrap script and first boot behavior |
| Networking | ENI, security group, route table, public/private subnet |
| Monitoring | status checks, CloudWatch metrics, CloudWatch Agent |
| Rescue | recover from broken OS, broken network, bad startup service |