趙品清
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    <style> .reveal, .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, "Microsoft JhengHei", Meiryo, "MS ゴシック", "MS Gothic", sans-serif; } h1, h2, h3, h4, h5, h6 { text-transform: none !important; } .color-yellow{ color: yellow; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; text-align: left; padding: 10px 0; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } </style> 2019/10/02 AWS服務分享課程_B版 --- # AWS服務介紹 - **EC2** & **ECS** - **Lambda** - **S3** & **EBS** - **Security** & **IAM** - **RDS** - **Big Data** - **ELB** & **ALB** - **CloudWatch** & **Auto Scaling** --- # 服務架構圖 ![](https://i.imgur.com/CxgvcLq.png) --- ## AWS地端分布 --- **AWS地端分布** - 一個Region會有多個AZ(Availability Zones)(至少2個),AZ之間網路互連以達成備援機制 ![](https://i.imgur.com/ByxGDRz.png) - 亞洲目前有四處Region,日本、韓國、新加坡、香港 --- ## EC2服務(Elastic Compute Cloud) --- **EC2服務** - 減少硬體建置成本(採購流程、硬體放入機房等等) - 目前可選擇兩種作業系統: **Linux**、**Windows** - 建置前須先規劃好Region、儲存容量、CPU、記憶體、網路設定....等 - 操作AMI執行EC2相關服務 **可根據不同的需求採用不同世代機,也有不同的計費方案** --- ### AMI 相關說明 AMI 可提供所需資訊來啟動instance。啟動instance時,必須指定 AMI。當需要多個具有相同組態的instance時,可以從單一 AMI 啟動多個instance。 --- AMI 包括下列項目: - 一個或多個 EBS 快照,或若為 instance-store-backed AMI,執行個體之根磁碟區的範本 (例如作業系統、應用程式伺服器和應用程式) - 控制哪些 AWS 帳戶可使用 AWS instance啟動的許可。 - 區塊型設備映射,指定啟動instance時連接至該instance的磁碟區。 --- ### 使用AMI流程 下圖說明AMI生命週期。在建立和註冊AMI之後,即可用以啟動新的instance ![](https://i.imgur.com/rtLdpIX.jpg) --- ### Instance Metadata 可透過下指令在特定連結獲取running instance(EC2)的資訊(metadata) ![](https://i.imgur.com/drEi4rR.png) --- ## ECS服務(Elastic Container Service) --- **ECS服務** - Amazon ECS 不需要安裝、操作和擴展自己的容器協調和叢集管理基礎設施。 - Amazon ECS 可以利用 AWS Fargate 全面管理基礎設施,並只專注於部署容器。或者選擇建立和終止 Docker 容器以檢視詳細的叢集狀態資訊。 --- ![](https://i.imgur.com/0OelTWn.png) --- ## Lambda 服務 --- **Lambda 服務** - 不需透過伺服器,只要上傳程式碼到lambda便可以執行運算 - 透過Amazon API可觸發其他AWS服務 - 資源有所變動時,Lambda會視需要執行函數並啟動和管理運算資源 - 按使用量付費 --- ![](https://i.imgur.com/J3frApR.png) --- ## VPC服務 --- **VPC服務** - VPC能夠在AWS雲端佈建一個在邏輯上隔離的部分,以在自己定義的虛擬網路中啟動 AWS 資源,可以完全掌控虛擬聯網環境。 ![](https://i.imgur.com/TWDNIGQ.png) --- **VPC組成如下:** 1. **Virtual Private Cloud**:AWS雲端中邏輯隔離的虛擬網路。可從所選的範圍內定義VPC的IP地址空間。 2. **Subnet**:在 VPC 的 IP 地址範圍內的某個區段,可將隔離資源的群組放入其中。 3. **Internet Gateway**:公有網際網路連線的 Amazon VPC 端。 4. **NAT Gateway**:高可用性受管網路位址轉譯 (NAT)服務,可在subnet中存取網際網路。 --- 5. **Virtual private gateway**:VPN 連接的 Amazon VPC 端。 6. **Peering Connection**:對等連線可讓您透過兩個對等 VPC 之間的私有 IP 地址路由流量。 7. **VPC Endpoints**:允許透過私有連線從您的 VPC 內連接到 AWS 上託管的服務,無須使用網際網路閘道、VPN、網路位址轉譯 (NAT) 裝置或防火牆代理。 8. **Egress-only Internet Gateway**:一種狀態閘道,針對從 VPC 到網際網路的 IPv6 流量提供只有輸出的存取。 --- ## Storage服務 S3 & EBS --- * 若以實際的資訊產品來比喻的話,S3像是網路磁碟(NAS、SAN)、EBS則像是外接硬碟(可掛載至EC2中使用) * S3是Object Storage,不必掛載就能利用API呼叫使用 * EBS是Block Storage,必須掛載至某台EC2才能使用 * S3的單個檔案最大可到5TB,檔案數量沒有限制,且能同時被多個Clients讀取 --- * EBS單個掛載空間最大到16TB,一次只能被一台EC2掛載 (單台EC2可掛載多個EBS) * EBS有IOPS可選用,但S3沒有,故EBS的存取效能會比S3好 * EBS有空間上和存取上的限制,S3則沒有;故建議依實際需求來採用S3、EBS的服務 (一般是混搭著一起用) --- **S3 & EBS** ![](https://i.imgur.com/Y9Mu3bj.jpg) --- ### S3 對比 EBS ![](https://i.imgur.com/7NdnmAA.jpg) --- ## AWS Security & IAM(Identity and Access Management) --- **AWS Security** 服務如下圖所示: ![](https://i.imgur.com/vmM96AP.jpg) --- 而**IAM**是一種 Web 服務透過 IAM 服務可以控管哪些使用者可以使用 AWS 資源,以及他們能使用的資源和採用方式,也就是授權,其提供的功能主要有: * 集中管理權限:我們可以集中管理 AWS 服務。 * 共享存取權限:我們可以讓其它人員授予管理和使用 AWS 帳號中資源的權限。 * 精細權限:我們可以針對不同資源向不同人員授予不同的權限。 * 聯合身份:我們可以允許聯合其它身份驗證機制或身份提供商的使用者獲取 AWS 帳號臨時存取權限。 --- * 多重驗證:我們可以向帳號和每個使用者增加雙重身份驗證以實現更高安全性。 * 確保身份資訊:我們可以搭配 CloudTrail 服務設定記錄,其中包括帳號中使用者請求資源的資訊。 * 最終一致性:我們可以透過複製在全球資料中心內多個伺服器上的資料實現高可用性。 * 資料安全標準:我們可以支援由商家或服務提供商處理、儲存和傳輸資料,且驗證符合資料安全標準 --- ![](https://i.imgur.com/XVxO7bJ.jpg) --- ## Amazon Relational Database Service (RDS) 服務 --- 讓用戶能夠在雲端中設定、操作和擴展關聯式資料庫,能自動處理硬體佈建、資料庫設定、修補程式和備份等耗時的管理任務。 ![](https://i.imgur.com/kbIdnf4.jpg) ---->可使用**AWS Database Migration Service**輕鬆地將現有的資料庫遷移或複寫到 Amazon RDS。 --- ### 結合RDS架構分布圖(Az1、Az2同步備份) ![](https://i.imgur.com/o1h8dYj.png) --- ## Dynamo DB 服務 --- NoSQL的服務,DynamoDB 本身都是透過 Web Service 存取,所以沒有 RDBMS Connection 的概念,所以也不會有 Connection Pool 的問題。 --- ### 與RDS比較 ![](https://i.imgur.com/hJ1s492.png) --- ## Big data 服務 --- ![](https://i.imgur.com/9PlySMq.png) --- ### 相關應用服務 - **Amazon EMR** 分散式架構資料處理軟體機群部屬精靈 - **Amazon Redshift** 一種支援SQL,屬於大量平行處理架構的資料倉儲 - **Amazon Athena** 基本就是SQL查詢S3的工具。 - **Amazon Kinesis** 即時的資料搜集處理服務,它每小時可以從數十萬個來源持續擷取和存放數百 TB 的資料,例如網站點擊流、金融交易、位置追蹤事件等 --- ## ELB(Elastic Load Balancing) & ALB (Application Load Balancing) --- * ELB可在多個目標(例如Amazon EC2 instance、container與IP address) 之間自動分配傳入的應用程式流量。它可以在單一可用區域或跨多個可用區域處理您應用程式流量的各種負載。 * ALB適合用來處理 HTTP 與 HTTPS 流量的負載平衡,可適用於一般 EC2 Instance或是Microservice與container運行的服務,以提供進階請求路由功能。ALB 在網路的應用層 (Layer 7 - application layer)運作。 --- **ALB & ELB 架構比較** ![](https://i.imgur.com/VuizMlS.png) --- ## CloudWatch 服務 --- 針對AWS的服務進行資源監控,有以下的概念: - **Namespaces** 為metrics的container,meteics在不同的namespaces彼此獨立,避免不同的應用程式的metrics彙總到同一個統計資料中。 - **Metrics** 選定要監控的資源、服務進行定義的一個變數,像是ECS中的CPU使用率就是一個metric。 --- - **Dimensions** 為每個metric賦予類別,而dimentions最多可以指定10個,當cloudWatch傳回資料後,便可利用dimensions對結果進行篩選。 - **Statistics** 指定一段期間內的metrics資料彙總後的結果。 - **Percentiles** 為更了解metrics資料的分布,可使用percentiles幫助資料進行統計。 - **Alarms** 利用alarm監控指定時間內的單一metric,並根據metric值的變化執行指定的操作。 --- **CloudWatch架構圖:** ![](https://i.imgur.com/LDJBwbm.jpg) --- ## Auto Scaling 服務 --- - Auto Scaling 是用來處理 Web application 水平擴充性(scale out)問題,會依據當下請求的忙碌程度來增減所需的 instance數目。該功能需要搭配 ELB 或是 CloudWatch 一起使用。 --- **Auto Scaling Lifecycle** ![](https://i.imgur.com/IUaXg0f.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully