2016年11月17日 星期四

AWS Associate SysOps準備(第一天)

2016-11-18

自己在工作上浸淫了兩年的AWS,也考取了幾張AWS的認證,決定想慢慢分享一些工作上的筆記,就決定從AWS  Assoc Sysops 的準備開始分享起吧。

aws assoc sysops 注重的部分是一些操作上的事項,所以面臨的考題,通常多是問A情境下,我們用什麼服務及操作可以解決此問題,以及各組件的監控問題


接下來幾天,會開始逐步分享,各Component需要注意的地方,並且以粗體字標記該段文字的主旨。

AMI

定義

Amazon 系统映像 (AMI) 提供启动实例(云中的虚拟服务器)所需的信息。 分為 Base EBS 與 Base s3 (instance store)。Region級服務,各Region的AMI 不一樣。

AMI的分享
http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/sharing-amis.html

分享ami的方式 有兩種,一種為 AMI設為公用,一種是將AMI給指定帳戶分享


製作一個共享AMI,又有一些建議事項,希望大家注意,盡可能將安全資訊刪除、屏蔽遠端root登錄。

http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/building-shared-amis.html


Auto Scaling

定義

透過自訂條件,讓aws進行增開刪減ec2的動作。

注意事項



AutoScaling群組內的機器,關閉開啟時會自動registry


若AutoScaling 持續開啟機器失敗一定時間, 會被suspend the scaling process



若要對AutoScaling群組的機器做Debug,記得要先Suspend AutoScaling,而Suspend會導致一些功能暫時停止,如terminate instance






不能正常啟用autoScaling的常見原因
associate keypair does not exist
Security group does not exist
autoscaling config is not working correctly
autoscaling group not found
instance type specified is not supported in the AZ
AZ is no longer supported
Invalid EBS device mapping
Autoscaling service is not enabled on ur account
attempting to attach and ebs block device to an instance-store AMI





提供的幾種監控方式

Health checks
CloudWatch metrics
CloudWatch Events
SNS notifications
CloudTrail logs



AutoScaling 擴增刪減規則衝突時 會報error



Bill & Cost

Canonical User ID
一個account 會有一個account id 與 canonical id, canonical id 用來切割資源使用

Consolidate billing 可以將不同帳號合併在一個帳號下做費用計算,但只能看Linked account的帳單明細,payee需要寄發request給要被linked的帳戶


透過cloudwatch監控帳單的流程
啟用billing alerts, 建立一個帳單警示, 檢查alarm status, 編輯billing alarm, 刪除billing alarm

用程式碼來處理帳單資訊需要做的行為

沒有留言:

張貼留言