认识
官网:https://aws.amazon.com/
文档:https://docs.aws.amazon.com/
仓库:None
AWS(Amazon Web Services)是亚马逊公司提供的一套云计算服务。简而言之,我们可以在 AWS 购买工具和服务,来我们代替自建机房的需求。
组成
—— 该部分笔记内容将介绍 AWS 服务平台的组成,以帮助我们构建 AWS 服务。但鉴于我们更加关注与 AWS 的使用,所以该部分不做详细笔记。
Regions, Availability Zones, and Local Zones
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
ap-southeast-1 Asia Pacific (Singapore)
Global Infrastructure
https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
构建
—— 该部分将介绍如何构建 AWS 服务平台,以使用 AWS 服务。我们更加关注于“使用 AWS 服务”,而非“从零开始构建 AWS 平台”。
帐号注册
AWS 海外区域 | https://portal.aws.amazon.com/billing/signup
AWS 中国区域 | https://www.amazonaws.cn/campaign/CloudService
区域选择
如何选择 AWS 地域,时国内访问速度最快
- 优先选择离中国大陆最近的 AWS 地域
- 使用 AWS 中国区域(需特殊申请)
- 优化网络性能: AWS Global Accelerator、CloudFront、Direct Connect、……
- 实测工具 | AWS Latency Monitoring | https://www.cloudping.co/
性质
—— 该部分笔记内容将介绍在获得 AWS 服务后我们能够使用的功能服务,以帮助我们了解 AWS 能够提供的功能。
价格计算器
aws-cli
文档:https://docs.aws.amazon.com/cli/
项目:https://github.com/aws/aws-cli
我们通过 Python Virtual Environment 安装该命令。
aws configure | 配置相关信息
Elastic File System
NFS
WAF
目前 WAF 自动化部署方案有几点需要注意:
具体参考下面文档链接:
https://docs.aws.amazon.com/solutions/latest/security-automations-for-aws-waf/use-the-solution.html
Simple Email Service
关于 AWS 上邮件服务 SES 的相关文档,可以参考下面链接:
https://docs.aws.amazon.com/ses/latest/dg/Welcome.html?icmpid=docs_ses_console
https://docs.aws.amazon.com/ses/latest/dg/getting-started.html
从沙盒退出的链接 | https://docs.aws.amazon.com/ses/latest/dg/request-production-access.html
目前 SES 有两种模式,一种是 domain 域名模式,一种是 EMAIL 模式,
https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#verify-domain-procedure
目前 SES 邮件发送除了控制台的测试验证,还支持 SMTP 和 API 方式发送批量邮件,具体可以参考 https://docs.aws.amazon.com/ses/latest/dg/send-email.html
You’re sending to Amazon SES from an Amazon EC2 instance using port 25, and you’re receiving timeout errors.
https://docs.aws.amazon.com/ses/latest/dg/troubleshoot-smtp.html
Connecting to an Amazon SES SMTP endpoint | https://docs.aws.amazon.com/ses/latest/dg/smtp-connect.html
Simple Notification Service
https://docs.aws.amazon.com/sns/latest/dg/welcome.html
SMS 的出沙箱文档:https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox-moving-to-production.html%EF%BC%9B
Route 53
域名迁移
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-between-aws-accounts.html
Hosted Zone | 需要修改域名中的 Name Server 配置。如果修改 NS 记录,根据 AWS 说明,是无效的。
VPC | Virtual Private Cloud
描述
- 官网:https://aws.amazon.com/vpc/
- 文档:https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
Q:在 Security Group 中,复用地址组?
A:https://docs.aws.amazon.com/vpc/latest/userguide/work-with-cust-managed-prefix-lists.html#create-managed-prefix-list
S:Managed prefix lists 进行 IP Address Group 定义,然后,在 Security Groups 中,添加 Inbound rules 地址可以选择 Prefix lists 来选中前面添加的地址组;
通过 aws ec2 modify-managed-prefix-list 命令,来修改 Managed prefix lists 信息。https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-managed-prefix-list.html
GA | Global Accelerator
DeepSeek / 介绍 AWS Global Accelerator 及使用方法
DeepSeek / Global Accelerator 如何配置使用特定区域的边缘节点
AWS Global Accelerator 是一项网络加速服务,通过 AWS 的全球边缘基础设施优化用户到应用程序的流量路径,显著降低延迟、提高可用性,尤其适合跨境访问(如中国用户访问海外服务器)。
官网:https://aws.amazon.com/global-accelerator/
文档:
- 固定任播 IP:分配两个静态 IP(从 AWS 的地址池),用户流量通过最近的 AWS 边缘节点(Edge Location)进入 AWS 骨干网,直达后端服务。在 AWS Global Accelerator 中,无法手动选择具体的边缘节点(如指定香港或东京节点),因为 Global Accelerator 的任播 IP会自动将用户路由到最近的 AWS 边缘节点(基于实时网络性能)。
- 智能路由:实时检测网络状况,自动选择最优路径(相比公网更稳定)。
- 无区域限制:加速全球用户访问,无需将服务部署在特定区域。
步骤 1:创建 Accelerator
进入 AWS Global Accelerator 控制台。
点击 Create accelerator,输入名称(如 my-app-accelerator)。
选择 Standard 模式(非自定义 IP)。
步骤 2:配置 Listener
添加监听器(Listener),选择协议(如 TCP)和端口(如 80/443)。
(可选)启用客户端亲和性(Client Affinity)保持会话粘性。
步骤 3:关联后端服务(Endpoint Group)
创建 Endpoint Group,选择区域(如东京 ap-northeast-1)。
添加后端资源类型:
Application Load Balancer (ALB):推荐用于 HTTP/HTTPS。
Network Load Balancer (NLB):适合 TCP/UDP。
EC2 实例:直接绑定实例(需开放安全组)。
配置健康检查(确保流量只路由到健康的端点)。
步骤 4:部署并测试
创建完成后,Global Accelerator 会分配两个静态 IP(如 1.2.3.4 和 5.6.7.8)。
将 DNS 解析(如 CNAME 记录)指向加速器的 DNS 名称(如 xxxxx.awsglobalaccelerator.com)。
使用工具(如 ping 或 traceroute)测试延迟变化。
场景:
✅ 需要低延迟的 TCP/UDP 应用(如游戏、视频会议)
✅ 跨境访问优化(如中国用户访问海外服务器)
✅ 高可用性需求(自动故障转移至健康端点)
针对负载均衡,允许使用 NLB ALB 类型。在 LB 中,Intergation 中,能够快速添加 GA 实例。
使用自己的地址池 |
- Bring your own IP addresses (BYOIP) in Global Accelerator | https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html
- Requirements | https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.requirements.html
AWS Latency Monitoring
DMS | Database Migration Service
数据库迁移服务
- 官网:https://aws.amazon.com/dms/
- 文档:https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.html
- 仓库:
应用
针对海外业务,我们使用 AWS 服务。
改进
我们的使用经验
在用
01)IAM
02)VPC / Subnet / Route / NAT
03)Route 53
04)EKS / Node: Spot / Storage: EFS
External DNS
Nginx Ingress Controller
Promtheus
Rancher Agent
05)EC2
06)RDS / MySQL CE
07)Amazon MemoryDB
10)Amazon MQ RabbitMQ
11)S3
1)WAF
2)AWS Loadbalancer Controller
3)kubeconfig -> aws
4)镜像预热
08)Amazon Simple Email Service
09)Simple Notification Serie
价格
硬盘的 gp2 切换到 gp3
参考
DeepSeek / 如何选择 AWS 地域,时国内访问速度最快