AWS

① 用户登录instance

使用AMI 创建 instance
连接 instance: 输入Ipv4 Ip + auth (private key file)
命令:aws s3 ls   用来list bucket(但此时缺少credentials) => 
1. 创建用户 IAM -> add user -> add auth -> download .csv
2. 配置用户凭证credentials:aws configure -> access Key ID + region name
aws s3 ls
aws ec2 describe-instance
aws ec2 stop-instance --instance-ids xxx

 

② cloudformation - template

-> choose WordPress blog -> 最后输出web url: 创建自己的blog网站

 

③ Dynamo: 复杂,容量大,session_id

 

④ EFS 

1. 创建EFS, 且EFS和EC2安全组要配置成一样
第二个EC2可以通过“操作” - “配置更多类似项” 快速启动

2. 挂载:EFS - disk mounting to EC2 (using commands)
df -h // check disk usage
EFS acts like a shared disk among instances

 

⑤ ELB routing polity

ELB healthcheck 检查EC2的负载均衡
DomainName healthcheck 检查域名是否正常
不能用IP,要用domain name(ELB的DNS名称)

simple routing policy 1对1
weighted routing policy 设置50; 150; 10 ...

failover routing policy
- create record set -> EC2 选择primary,S3选择secondary(备用)
模拟EC2 stopped,但DomainName health,因为流量到S3

geolocation routing policy
hosted zones -> create record set -> EC2 -> location Asia -> Asia
create record set -> S3 -> location default -> other region

latency Routing policy

 

⑥ NAT

NAT gateway: 转private address to public addr
create private instance + public instance(自动分配共有IP)
社区AMI: NAT -> create public NAT -> 创建成功 -> 操作 ->
联网 -> 更改源/目标检查 -> 禁用!(意思是目标addr就是这个instance,但这个是NAT,转发流量)

 

⑦ S3 Transfer Acceleration

S3 -> choose a bucket -> atrribute -> Transfer Acceleration -> start

 

 

⑧ cloudFront - CDN
create cloudFront associated with an S3 bucket

 

 

⑨ lambda - auto execute code
set trigger(cron command) + (start/stop instance)code

posted @ 2024-03-04 21:39  PEAR2020  阅读(7)  评论(0编辑  收藏  举报