

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon Location Service 的安全性
<a name="security"></a>

的雲端安全 AWS 是最高優先順序。身為 AWS 客戶，您可以受益於資料中心和網路架構，這些架構專為符合最安全敏感組織的需求而建置。

安全性是 AWS 與您之間的共同責任。[共同責任模型](https://aws.amazon.com/compliance/shared-responsibility-model/)將其描述為雲端*的*安全性和雲端*中*的安全性：
+ **雲端的安全性** – AWS 負責保護在 中執行 AWS 服務的基礎設施 AWS 雲端。 AWS 也為您提供可安全使用的服務。在[AWS 合規計畫](https://aws.amazon.com/compliance/programs/)中，第三方稽核人員會定期測試和驗證我們安全的有效性。若要了解適用於 Amazon Location Service 的合規計劃，請參閱[AWS 合規計劃的 服務範圍](https://aws.amazon.com/compliance/services-in-scope/)。
+ **雲端的安全性** – 您的責任取決於您使用 AWS 的服務。您也必須對其他因素負責，包括資料的機密性、您公司的要求和適用法律和法規。

本文件可協助您了解如何在使用 Amazon Location 時套用共同責任模型。下列主題說明如何設定 Amazon Location 以符合您的安全與合規目標。您也會了解如何使用其他 AWS 服務來協助您監控和保護 Amazon Location 資源。

**Topics**
+ [Amazon Location Service 中的資料保護](data-protection.md)
+ [Amazon Location Service 中的事件回應](incident-response.md)
+ [Amazon Location Service 的合規驗證](compliance-validation.md)
+ [Amazon Location Service 中的彈性](disaster-recovery-resiliency.md)
+ [Amazon Location Service 中的基礎設施安全性](infrastructure-security.md)
+ [AWS PrivateLink 適用於 Amazon Location 的](privatelink-interface-endpoints.md)
+ [Amazon Location 中的組態和漏洞分析](vulnerability-analysis-and-management.md)
+ [預防跨服務混淆代理人](cross-service-confused-deputy-prevention.md)
+ [Amazon Location Service 的最佳實務](best-practices.md)

# Amazon Location Service 中的資料保護
<a name="data-protection"></a>

 AWS [共同責任模型](https://aws.amazon.com/compliance/shared-responsibility-model/)適用於 Amazon Location Service 中的資料保護。如此模型所述， AWS 負責保護執行所有 的全域基礎設施 AWS 雲端。您負責維護在此基礎設施上託管內容的控制權。您也同時負責所使用 AWS 服務 的安全組態和管理任務。如需資料隱私權的詳細資訊，請參閱[資料隱私權常見問答集](https://aws.amazon.com/compliance/data-privacy-faq/)。如需有關歐洲資料保護的相關資訊，請參閱 *AWS 安全性部落格*上的 [AWS 共同的責任模型和 GDPR](https://aws.amazon.com/blogs/security/the-aws-shared-responsibility-model-and-gdpr/) 部落格文章。

基於資料保護目的，我們建議您保護 AWS 帳戶 登入資料，並使用 AWS IAM Identity Center 或 AWS Identity and Access Management (IAM) 設定個別使用者。如此一來，每個使用者都只會獲得授與完成其任務所必須的許可。我們也建議您採用下列方式保護資料：
+ 每個帳戶均要使用多重要素驗證 (MFA)。
+ 使用 SSL/TLS 與 AWS 資源通訊。我們需要 TLS 1.2 並建議使用 TLS 1.3。
+ 使用 設定 API 和使用者活動記錄 AWS CloudTrail。如需有關使用 CloudTrail 追蹤擷取 AWS 活動的資訊，請參閱*AWS CloudTrail 《 使用者指南*》中的[使用 CloudTrail 追蹤](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-trails.html)。
+ 使用 AWS 加密解決方案，以及其中的所有預設安全控制 AWS 服務。
+ 使用進階的受管安全服務 (例如 Amazon Macie)，協助探索和保護儲存在 Amazon S3 的敏感資料。
+ 如果您在 AWS 透過命令列界面或 API 存取 時需要 FIPS 140-3 驗證的密碼編譯模組，請使用 FIPS 端點。如需有關 FIPS 和 FIPS 端點的更多相關資訊，請參閱[聯邦資訊處理標準 (FIPS) 140-3](https://aws.amazon.com/compliance/fips/)。

我們強烈建議您絕對不要將客戶的電子郵件地址等機密或敏感資訊，放在標籤或自由格式的文字欄位中，例如**名稱**欄位。這包括當您使用 Amazon Location 或使用主控台、API AWS CLI、 AWS SDKs的其他 AWS 服務 時。您在標籤或自由格式文字欄位中輸入的任何資料都可能用於計費或診斷日誌。如果您提供外部伺服器的 URL，我們強烈建議請勿在驗證您對該伺服器請求的 URL 中包含憑證資訊。



# 資料隱私權
<a name="data-privacy"></a>

使用 Amazon Location Service，您可以保留組織資料的控制權。Amazon Location 透過移除客戶中繼資料和帳戶資訊，將所有傳送至資料提供者的查詢匿名化。

Amazon Location 不會使用資料提供者進行追蹤和地理驗證。這表示您的敏感資料會保留在您的 AWS 帳戶中。這有助於保護敏感位置資訊，例如來自第三方的設施、資產和人員位置、保護使用者隱私權，並降低應用程式的安全風險。

如需詳細資訊，請參閱[AWS 資料隱私權常見問答集](https://aws.amazon.com/compliance/data-privacy-faq/)。

# Amazon Location 中的資料保留
<a name="data-retention"></a>

下列特性與 Amazon Location 如何收集和存放服務的資料相關：
+ **Amazon Location Service 追蹤器** – 當您使用追蹤器 APIs追蹤實體的位置時，可以儲存其座標。裝置位置會儲存 30 天，然後由服務刪除。
+ **Amazon Location Service Geofences** – 當您使用 Geofences APIs 定義感興趣的區域時，服務會存放您提供的幾何。必須明確刪除它們。
**注意**  
刪除 AWS 您的帳戶會刪除其中的所有資源。如需詳細資訊，請參閱[AWS 資料隱私權常見問答集](https://aws.amazon.com/compliance/data-privacy-faq/)。

# Amazon Location Service 的靜態資料加密
<a name="encryption-at-rest"></a>

Amazon Location Service 預設提供加密，以使用 AWS 擁有的加密金鑰保護靜態敏感客戶資料。
+ **AWS 擁有的金鑰** — Amazon Location 預設使用這些金鑰自動加密個人身分識別資料。您無法檢視、管理或使用 AWS 擁有的金鑰，或稽核其使用方式。不過，您不需要採取任何動作或變更任何程式，即可保護加密您資料的金鑰。如需詳細資訊，請參閱《AWS Key Management Service 開發人員指南》**中的 [AWS 擁有的金鑰](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk)。

依預設加密靜態資料，有助於降低保護敏感資料所涉及的營運開銷和複雜性。同時，其可讓您建置符合嚴格加密合規性和法規要求的安全應用程式。

雖然您無法停用此層加密或選取替代加密類型，但您可以在建立追蹤器和地理圍欄集合資源時選擇客戶受管金鑰，在現有 AWS 擁有的加密金鑰上新增第二層加密：
+ **客戶受管金鑰** — Amazon Location 支援使用您建立、擁有和管理的對稱客戶受管金鑰，以透過現有 AWS 擁有的加密新增第二層加密。您可以完全控制此層加密，因此能執行以下任務：
  + 建立和維護金鑰政策
  + 建立和維護 IAM 政策和授予操作
  + 啟用和停用金鑰政策
  + 輪換金鑰密碼編譯資料
  + 新增 標籤
  + 建立金鑰別名
  + 安排金鑰供刪除

  如需詳細資訊，請參閱《 *AWS Key Management Service 開發人員指南*》中的[客戶受管金鑰](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk)。

下表摘要說明 Amazon Location 如何加密個人身分識別資料。


| 資料類型 | AWS 擁有的金鑰加密 | 客戶自管金鑰加密 (選用) | 
| --- | --- | --- | 
| Position包含[裝置位置詳細資訊的](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointTracking_DevicePosition.html)點幾何。 | 已啟用 | 已啟用 | 
| PositionProperties[與位置更新相關聯的](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointTracking_DevicePosition.html)一組鍵/值對。 | 已啟用 | 已啟用 | 
| GeofenceGeometry代表[地理圍欄](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointGeofencing_GeofenceGeometry.html)區域的多邊形地理圍欄幾何。 | 已啟用 | 已啟用 | 
| DeviceId[將裝置位置更新上傳至追蹤器資源時指定的裝置](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointTracking_DevicePositionUpdate.html)識別符。 | 已啟用 | 不支援 | 
| GeofenceId在指定地理[圍欄集合中存放地理](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointGeofencing_PutGeofence.html)圍欄幾何或一[批](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointGeofencing_BatchPutGeofence.html)地理圍欄時指定的識別符。 | 已啟用 | 不支援 | 

**注意**  
Amazon Location 使用 AWS 擁有的金鑰自動啟用靜態加密，免費保護個人身分識別資料。  
不過，使用客戶受管金鑰需支付 AWS KMS 費用。如需定價的詳細資訊，請參閱 [AWS Key Management Service 定價](https://aws.amazon.com/kms/pricing/)。

如需詳細資訊 AWS KMS，請參閱[什麼是 AWS Key Management Service？](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html) 

## Amazon Location Service 如何在 中使用授予 AWS KMS
<a name="encryption-grant"></a>

Amazon Location 需要[授予](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)才能使用客戶受管金鑰。

當您建立使用客戶受管金鑰加密的[追蹤器資源](https://docs.aws.amazon.com/location/latest/developerguide/trackers.html)或[地理圍欄集合](https://docs.aws.amazon.com/location/latest/developerguide/geofences.html)時，Amazon Location 會透過傳送 [CreateGrant](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html) 請求至 來代表您建立授予 AWS KMS。中的授予 AWS KMS 用於授予 Amazon Location 存取客戶帳戶中 KMS 金鑰的權限。

Amazon Location 需要授予 ，才能將客戶受管金鑰用於下列內部操作：
+ 將 [DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html) 請求傳送至 AWS KMS ，以驗證建立追蹤器或地理圍欄集合時輸入的對稱客戶受管 KMS 金鑰 ID 是否有效。
+ 將 [GenerateDataKeyWithoutPlaintext](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html) 請求傳送至 AWS KMS ，以產生由客戶受管金鑰加密的資料金鑰。
+ 將 [Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) 請求傳送至 AWS KMS 以解密加密的資料金鑰，以便用來加密您的資料。

您可以隨時撤銷授予的存取權，或移除服務對客戶受管金鑰的存取權。如果您這麼做，Amazon Location 將無法存取客戶受管金鑰加密的任何資料，這會影響相依於該資料的操作。例如，如果您嘗試從 Amazon Location 無法存取的加密追蹤器[取得裝置位置](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointTracking_GetDevicePosition.html)，則操作會傳回`AccessDeniedException`錯誤。

## 建立客戶自管金鑰
<a name="create-key"></a>

 您可以使用 AWS 管理主控台或 AWS KMS APIs 來建立對稱客戶受管金鑰。

**建立對稱客戶受管金鑰**

請依照《AWS Key Management Service 開發人員指南》**中[建立對稱客戶受管金鑰](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html#create-symmetric-cmk)的步驟進行。

**金鑰政策**

金鑰政策會控制客戶受管金鑰的存取權限。每個客戶受管金鑰都必須只有一個金鑰政策，其中包含決定誰可以使用金鑰及其使用方式的陳述式。在建立客戶受管金鑰時，可以指定金鑰政策。如需詳細資訊，請參閱《AWS Key Management Service 開發人員指南》**中的[管理客戶受管金鑰的存取](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html)。

若要將客戶受管金鑰與 Amazon Location 資源搭配使用，必須在金鑰政策中允許下列 API 操作：
+ `[kms:CreateGrant](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html)`：新增客戶受管金鑰的授權。授予控制對指定 KMS 金鑰的存取權，以允許存取 Amazon Location 所需的[授予操作](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)。如需詳細資訊，請參閱 *AWS Key Management Service Developer Guide* 中的 [Using Grants](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)。

  這可讓 Amazon Location 執行下列動作：
  + 呼叫 `GenerateDataKeyWithoutPlainText` 以產生加密的資料金鑰並加以儲存，因為資料金鑰不會立即用來加密。
  + 呼叫 `Decrypt` 以使用儲存的加密資料金鑰來存取加密的資料。
  + 設定淘汰主體，以允許服務執行 `RetireGrant`。
+ `[kms:DescribeKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html)` – 提供客戶自管金鑰詳細資訊，以讓 Amazon Location 驗證金鑰。

以下是您可以為 Amazon Location 新增的政策聲明範例：

```
  "Statement" : [ 
    {
      "Sid" : "Allow access to principals authorized to use Amazon Location",
      "Effect" : "Allow",
      "Principal" : {
        "AWS" : "*"
      },
      "Action" : [ 
        "kms:DescribeKey", 
        "kms:CreateGrant"
      ],
      "Resource" : "*",
      "Condition" : {
        "StringEquals" : {
          "kms:ViaService" : "geo.region.amazonaws.com",
          "kms:CallerAccount" : "111122223333"
        }
    },
    {
      "Sid": "Allow access for key administrators",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::111122223333:root"
       },
      "Action" : [ 
        "kms:*"
       ],
      "Resource": "arn:aws:kms:region:111122223333:key/key_ID"
    },
    {
      "Sid" : "Allow read-only access to key metadata to the account",
      "Effect" : "Allow",
      "Principal" : {
        "AWS" : "arn:aws:iam::111122223333:root"
      },
      "Action" : [ 
        "kms:Describe*",
        "kms:Get*",
        "kms:List*",
        "kms:RevokeGrant"
      ],
      "Resource" : "*"
    }
  ]
```

如需有關[在政策中指定許可](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html)的詳細資訊，請參閱《AWS Key Management Service 開發人員指南》**。

如需有關[故障診斷金鑰存取](https://docs.aws.amazon.com/kms/latest/developerguide/policy-evaluation.html#example-no-iam)的詳細資訊，請參閱《AWS Key Management Service 開發人員指南》**。

## 指定 Amazon Location 的客戶受管金鑰
<a name="enable-custom-encryption"></a>

您可以將客戶自管金鑰指定為下列資源的第二層加密：
+ [建立追蹤器](start-create-tracker.md)
+ [開始使用 Amazon Location Service Geofences](geofence-gs.md)

建立資源時，您可以輸入 **KMS ID** 來指定資料金鑰，Amazon Location 會使用此 ID 來加密資源存放的可識別個人資料。
+ **KMS ID** — AWS KMS 客戶受管[金鑰的金鑰識別符](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id)。輸入金鑰 ID、金鑰 ARN、別名名稱或別名 ARN。

## Amazon Location Service 加密內容
<a name="location-encryption-context"></a>

[加密內容](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)是一組選用的金鑰值對，包含資料的其他相關內容資訊。

AWS KMS 使用加密內容做為[額外的已驗證資料](https://docs.aws.amazon.com/kms/latest/cryptographic-details/crypto-primitives.html)，以支援已[驗證的加密](https://docs.aws.amazon.com/kms/latest/cryptographic-details/crypto-primitives.html)。當您在加密資料的請求中包含加密內容時， 會將加密內容 AWS KMS 繫結至加密的資料。若要解密資料，您必須在請求中包含相同的加密內容。

**Amazon Location Service 加密內容**

Amazon Location 在所有 AWS KMS 密碼編譯操作中使用相同的加密內容，其中金鑰為 ，`aws:geo:arn`而值為資源 [Amazon Resource Name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) (ARN)。

**Example**  

```
"encryptionContext": {
    "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection"
}
```

**使用加密內容進行監控**

當您使用對稱客戶自管金鑰加密追蹤器或地理柵欄集合時，您也可以在稽核記錄和日誌中使用加密內容，以識別客戶自管金鑰的使用方式。加密內容也會出現在 [AWS CloudTrail 或 Amazon CloudWatch Logs 產生的日誌](#example-custom-encryption)中。

**使用加密內容控制對客戶受管金鑰的存取**

您也可以在金鑰政策和 IAM 政策中，使用加密內容作為 `conditions` 來控制對於對稱客戶受管金鑰的存取。您也可以在授予中使用加密內容條件。

Amazon Location 在授予中使用加密內容限制，以控制對您帳戶或區域中客戶受管金鑰的存取。授予條件會要求授予允許的操作使用指定的加密內容。

**Example**  
以下是授予特定加密內容之客戶受管金鑰存取權的金鑰政策陳述式範例。此政策陳述式中的條件會要求具有指定加密內容的加密內容條件。  

```
{
    "Sid": "Enable DescribeKey",
    "Effect": "Allow",
    "Principal": {
        "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole"
     },
     "Action": "kms:DescribeKey",
     "Resource": "*"
},
{
     "Sid": "Enable CreateGrant",
     "Effect": "Allow",
     "Principal": {
         "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole"
     },
     "Action": "kms:CreateGrant",
     "Resource": "*",
     "Condition": {
         "StringEquals": {
             "kms:EncryptionContext:aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:tracker/SAMPLE-Tracker"
          }
     }
}
```

## 監控 Amazon Location Service 的加密金鑰
<a name="example-custom-encryption"></a>

當您搭配 Amazon Location Service 資源使用 AWS KMS 客戶受管金鑰時，您可以使用 [AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)或 [Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) 來追蹤 Amazon Location 傳送的請求 AWS KMS。

下列範例是 `CreateGrant`、`Decrypt`、 `GenerateDataKeyWithoutPlainText`和 AWS CloudTrail 的事件`DescribeKey`，用於監控 Amazon Location 呼叫的 KMS 操作，以存取客戶受管金鑰加密的資料：

------
#### [ CreateGrant ]

當您使用 AWS KMS 客戶受管金鑰來加密追蹤器或地理圍欄收集資源時，Amazon Location 會代表您傳送`CreateGrant`請求，以存取您 AWS 帳戶中的 KMS 金鑰。Amazon Location 建立的授予專屬於 AWS KMS 與客戶受管金鑰相關聯的資源。此外，當您刪除資源時，Amazon Location 會使用 `RetireGrant`操作來移除授予。

下面的範例事件會記錄 `CreateGrant` 操作：

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
        "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
        "accountId": "111122223333",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE3",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
                "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
                "accountId": "111122223333",
                "userName": "Admin"
            },
            "webIdFederationData": {},
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2021-04-22T17:02:00Z"
            }
        },
        "invokedBy": "geo.amazonaws.com"
    },
    "eventTime": "2021-04-22T17:07:02Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "CreateGrant",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "172.12.34.56",
    "userAgent": "ExampleDesktop/1.0 (V1; OS)",
    "requestParameters": {
        "retiringPrincipal": "geo.region.amazonaws.com",
        "operations": [
            "GenerateDataKeyWithoutPlaintext",
            "Decrypt",
            "DescribeKey"
        ],
        "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE",
        "granteePrincipal": "geo.region.amazonaws.com"
    },
    "responseElements": {
        "grantId": "0ab0ac0d0b000f00ea00cc0a0e00fc00bce000c000f0000000c0bc0a0000aaafSAMPLE"
    },
    "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "readOnly": false,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::KMS::Key",
            "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "eventCategory": "Management",
    "recipientAccountId": "111122223333"
}
```

------
#### [ GenerateDataKeyWithoutPlainText ]

當您為追蹤器或地理圍欄集合資源啟用 AWS KMS 客戶受管金鑰時，Amazon Location 會建立唯一的資料表金鑰。它會將`GenerateDataKeyWithoutPlainText`請求傳送至 AWS KMS ，以指定資源 AWS KMS 的客戶受管金鑰。

下面的範例事件會記錄 `GenerateDataKeyWithoutPlainText` 操作：

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AWSService",
        "invokedBy": "geo.amazonaws.com"
    },
    "eventTime": "2021-04-22T17:07:02Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "GenerateDataKeyWithoutPlaintext",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "172.12.34.56",
    "userAgent": "ExampleDesktop/1.0 (V1; OS)",
    "requestParameters": {
        "encryptionContext": {
            "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection"
        },
        "keySpec": "AES_256",
        "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
    },
    "responseElements": null,
    "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "readOnly": true,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::KMS::Key",
            "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "eventCategory": "Management",
    "recipientAccountId": "111122223333",
    "sharedEventID": "57f5dbee-16da-413e-979f-2c4c6663475e"
}
```

------
#### [ Decrypt ]

當您存取加密追蹤器或地理圍欄集合時，Amazon Location 會呼叫 `Decrypt`操作，以使用儲存的加密資料金鑰來存取加密的資料。

下面的範例事件會記錄 `Decrypt` 操作：

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AWSService",
        "invokedBy": "geo.amazonaws.com"
    },
    "eventTime": "2021-04-22T17:10:51Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "Decrypt",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "172.12.34.56",
    "userAgent": "ExampleDesktop/1.0 (V1; OS)",
    "requestParameters": {
        "encryptionContext": {
            "aws:geo:arn": "arn:aws:geo:us-west-2:111122223333:geofence-collection/SAMPLE-GeofenceCollection"
        },
        "keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE",
        "encryptionAlgorithm": "SYMMETRIC_DEFAULT"
    },
    "responseElements": null,
    "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "readOnly": true,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::KMS::Key",
            "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "eventCategory": "Management",
    "recipientAccountId": "111122223333",
    "sharedEventID": "dc129381-1d94-49bd-b522-f56a3482d088"
}
```

------
#### [ DescribeKey ]

Amazon Location 使用 `DescribeKey`操作來驗證與追蹤器或地理圍欄集合相關聯的 AWS KMS 客戶受管金鑰是否存在於帳戶和區域中。

下面的範例事件會記錄 `DescribeKey` 操作：

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
        "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
        "accountId": "111122223333",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE3",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROAIGDTESTANDEXAMPLE:Sampleuser01",
                "arn": "arn:aws:sts::111122223333:assumed-role/Admin/Sampleuser01",
                "accountId": "111122223333",
                "userName": "Admin"
            },
            "webIdFederationData": {},
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2021-04-22T17:02:00Z"
            }
        },
        "invokedBy": "geo.amazonaws.com"
    },
    "eventTime": "2021-04-22T17:07:02Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "DescribeKey",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "172.12.34.56",
    "userAgent": "ExampleDesktop/1.0 (V1; OS)",
    "requestParameters": {
        "keyId": "00dd0db0-0000-0000-ac00-b0c000SAMPLE"
    },
    "responseElements": null,
    "requestID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "eventID": "ff000af-00eb-00ce-0e00-ea000fb0fba0SAMPLE",
    "readOnly": true,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::KMS::Key",
            "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-123456SAMPLE"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "eventCategory": "Management",
    "recipientAccountId": "111122223333"
}
```

------

## 進一步了解
<a name="Learn-more-data-at-rest-encryption"></a>

下列資源會提供有關靜態資料加密的詳細資訊。
+ 如需 [AWS Key Management Service 基本概念](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html)的詳細資訊，請參閱《AWS Key Management Service 開發人員指南》**。
+ 如需 [安全最佳實務 AWS Key Management Service](https://docs.aws.amazon.com/kms/latest/developerguide/kms-security.html)的詳細資訊，請參閱 *AWS Key Management Service 開發人員指南*。

# Amazon Location Service 的傳輸中資料加密
<a name="encryption-in-transit"></a>

Amazon Location 透過使用 Transport Layer Security (TLS) 1.2 加密通訊協定自動加密所有網路間資料，保護傳輸中資料往返服務的過程。傳送到 Amazon Location Service APIs直接 HTTPS 請求是使用 [AWS Signature 第 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html) 版演算法來簽署，以建立安全連線。

# Amazon Location Service 中的事件回應
<a name="incident-response"></a>

安全是 AWS最重視的一環。作為 AWS 雲端[共同責任模型](https://aws.amazon.com/compliance/shared-responsibility-model/)的一部分， AWS 管理符合最安全敏感組織的要求的資料中心和網路架構。身為 AWS 客戶，您需共同負責維護雲端的安全性。這表示您可以從可存取的 AWS 工具和功能控制您選擇實作的安全性。

建立安全基準以達到讓應用程式在雲端中執行的目標，您就可以偵測偏差並加以回應。由於安全事件回應可能是一個複雜的主題，因此建議您檢閱下列資源，以便更了解事件回應 (IR) 和您的選擇對您公司目標的影響：[AWS 安全事件回應指南](https://docs.aws.amazon.com/whitepapers/latest/aws-security-incident-response-guide/aws-security-incident-response-guide.html)、[AWS 安全最佳實務](https://aws.amazon.com/architecture/security-identity-compliance/?cards-all.sort-by=item.additionalFields.sortDate&cards-all.sort-order=desc)白皮書和[AWS 雲端採用架構 (AWS CAF)](https://aws.amazon.com/cloud-adoption-framework/#Security_Perspective)。

# 在 Amazon Location Service 中記錄和監控
<a name="security-logging-and-monitoring"></a>

記錄和監控是事件回應的重要部分。它可讓您建立安全基準，以偵測您可以調查和回應的偏差。透過實作 Amazon Location Service 的記錄和監控，您可以維護專案和資源的可靠性、可用性和效能。

AWS 提供數種工具，可協助您記錄和收集事件回應的資料：

**AWS CloudTrail**  
Amazon Location Service 與 整合 AWS CloudTrail，此服務提供使用者、角色 AWS 或服務所採取動作的記錄。這包括來自 Amazon Location Service 主控台的動作，以及對 Amazon Location API 操作的程式設計呼叫。這些動作記錄稱為事件。如需詳細資訊，請參閱[使用 記錄和監控 Amazon Location Service AWS CloudTrail](https://docs.aws.amazon.com/location/latest/developerguide/cloudtrail.html)。

**Amazon CloudWatch**  
您可以使用 Amazon CloudWatch 來收集和分析與您的 Amazon Location Service 帳戶相關的指標。如果指標符合特定條件，且已達到指定的閾值，您可以啟用 CloudWatch 警示來通知您。當您建立警示時，CloudWatch 會將通知傳送至您定義的 Amazon Simple Notification Service。如需詳細資訊，請參閱[使用 Amazon CloudWatch 監控 Amazon Location Service](https://docs.aws.amazon.com/location/latest/developerguide/cloudwatch.html)。

**AWS Health 儀表板**  
您可以使用 [AWS Health Dashboards](https://status.aws.amazon.com/) 驗證 Amazon Location Service 服務的狀態。您也可以監控和檢視可能影響您 AWS 環境的任何事件或問題的歷史資料。如需詳細資訊，請參閱「[AWS Health 使用者指南](https://docs.aws.amazon.com/health/latest/ug/what-is-aws-health.html)」。

# Amazon Location Service 的合規驗證
<a name="compliance-validation"></a>

若要了解 是否 AWS 服務 在特定合規計劃範圍內，請參閱[AWS 服務 合規計劃範圍內](https://aws.amazon.com/compliance/services-in-scope/)然後選擇您感興趣的合規計劃。如需一般資訊，請參閱[AWS 合規計劃](https://aws.amazon.com/compliance/programs/)。

您可以使用 下載第三方稽核報告 AWS Artifact。如需詳細資訊，請參閱[下載報告 in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html)

您使用 時的合規責任 AWS 服務 取決於資料的機密性、您公司的合規目標，以及適用的法律和法規。如需使用 時合規責任的詳細資訊 AWS 服務，請參閱 [AWS 安全文件](https://docs.aws.amazon.com/security/)。

# Amazon Location Service 中的彈性
<a name="disaster-recovery-resiliency"></a>

 AWS 全球基礎設施是以 AWS 區域 和 可用區域為基礎建置。 AWS 區域 提供多個實體隔離和隔離的可用區域，這些可用區域與低延遲、高輸送量和高備援聯網連接。透過可用區域，您可以設計與操作的應用程式和資料庫，在可用區域之間自動容錯移轉而不會發生中斷。可用區域的可用性、容錯能力和擴展能力，均較單一或多個資料中心的傳統基礎設施還高。

如需 AWS 區域 和可用區域的詳細資訊，請參閱 [AWS 全球基礎設施](https://aws.amazon.com/about-aws/global-infrastructure/)。

除了 AWS 全球基礎設施之外，Amazon Location 還提供數種功能，以協助支援您的資料彈性和備份需求。

# Amazon Location Service 中的基礎設施安全性
<a name="infrastructure-security"></a>

Amazon Location Service 是受管服務，受到 AWS 全球網路安全的保護。如需 AWS 安全服務以及如何 AWS 保護基礎設施的資訊，請參閱[AWS 雲端安全](https://aws.amazon.com/security/)。若要使用基礎設施安全的最佳實務來設計您的 AWS 環境，請參閱*安全支柱 AWS Well-Architected Framework* 中的[基礎設施保護](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/infrastructure-protection.html)。

您可以使用 AWS 發佈的 API 呼叫，透過網路存取 Amazon Location。使用者端必須支援下列專案：
+ Transport Layer Security (TLS)。我們需要 TLS 1.2 並建議使用 TLS 1.3。
+ 具備完美轉送私密(PFS)的密碼套件，例如 DHE (Ephemeral Diffie-Hellman)或 ECDHE (Elliptic Curve Ephemeral Diffie-Hellman)。現代系統(如 Java 7 和更新版本)大多會支援這些模式。

# AWS PrivateLink 適用於 Amazon Location 的
<a name="privatelink-interface-endpoints"></a>

使用 AWS PrivateLink for Amazon Location，您可以在虛擬私有雲端 *(Amazon VPC*) 中佈建介面 Amazon VPC 端點 （介面端點）。這些端點可直接透過 VPN 和 內部部署的應用程式存取 Direct Connect，或在不同的 AWS 區域 [Amazon VPC 對等互連](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html)中存取。使用 AWS PrivateLink 和 介面端點，您可以簡化從應用程式到 Amazon Location 的私有網路連線。

VPC 中的應用程式不需要公有 IP 地址，即可與 Amazon Location 介面 VPC 端點進行 Amazon Location 操作通訊。介面端點由一或多個彈性網路介面 (ENI) 所組成，這些介面會從 Amazon VPC 的子網路中指派私有 IP 位址。透過介面端點對 Amazon Location 的請求會保留在 Amazon 網路上。您也可以透過 Direct Connect 或 AWS Virtual Private Network ()，從內部部署應用程式存取 Amazon VPC 中的介面端點Site-to-Site VPN。如需如何將 Amazon VPC 連線至內部部署網路的詳細資訊，請參閱 [Direct Connect 使用者指南](https://docs.aws.amazon.com/directconnect/latest/UserGuide/Welcome.html)和 [AWS Site-to-Site VPN 使用者指南](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html)。

如需介面端點的一般資訊，請參閱《 *AWS PrivateLink 指南*》中的[介面 Amazon VPC 端點 (AWS PrivateLink)](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html)。

**Topics**
+ [Amazon Location Service 的 Amazon VPC 端點類型](#types-of-vpc-endpoints-for-al)
+ [使用 AWS PrivateLink for Amazon Location Service 時的考量事項](#privatelink-considerations)
+ [建立 Amazon Location Service 的介面端點](#al-creating-vpc)
+ [從 Amazon Location 介面端點存取 Amazon Location API 操作](#accessing-apis-from-interface-endpoints)
+ [更新內部部署 DNS 組態](#updating-on-premises-dns-config)
+ [為 Amazon Location 建立 Amazon VPC 端點政策](#creating-vpc-endpoint-policy)

## Amazon Location Service 的 Amazon VPC 端點類型
<a name="types-of-vpc-endpoints-for-al"></a>

您可以使用一種 Amazon VPC 端點類型來存取 Amazon Location Service：*介面端點* （使用 AWS PrivateLink)。*介面端點*使用私有 IP 地址，透過 AWS 區域 使用 Amazon VPC 對等互連，將請求從 Amazon VPC 內部、內部部署或其他 Amazon VPC 路由至 Amazon Location。如需詳細資訊，請參閱[什麼是 Amazon VPC 對等互連？](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html)和 [ Transit Gateway 與 Amazon VPC 對等互連](https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/vpc-to-vpc-connectivity.html)。

介面端點與閘道端點相容。若您的 Amazon VPC 中已有現有的閘道端點，則可在同一個 Amazon VPC 中同時使用這兩種類型的端點。

Amazon Location 的界面端點具有下列屬性：
+ 您的網路流量會保留在 AWS 網路上
+ 從您的 Amazon VPC 使用私有 IP 地址存取 Amazon Location Service
+ 允許從內部部署存取
+  AWS 區域 使用 Amazon VPC 對等互連或 允許從另一個 中的 Amazon VPC 端點存取 AWS Transit Gateway
+ 介面端點已計費

## 使用 AWS PrivateLink for Amazon Location Service 時的考量事項
<a name="privatelink-considerations"></a>

Amazon VPC 考量適用於 AWS PrivateLink Amazon Location Service。如需詳細資訊，請參閱《AWS PrivateLink 指南》**中的[介面端點考量事項](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html)和 [AWS PrivateLink 配額](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-limits-endpoints.html)。此外，適用下列限制。

AWS PrivateLink for Amazon Location Service 不支援下列項目：
+ Transport Layer Security (TLS) 1.1
+ 私有與混合網域名稱系統 (DNS) 服務

Amazon VPC 端點：
+ 不支援 [Amazon Location Service Maps API](https://docs.aws.amazon.com/location/latest/APIReference/API_Operations_Amazon_Location_Service_Maps_V2.html) 操作，包括：`GetSprites`、 `GetGlyphs`和 `GetStyleDescriptor`
+ 不支援跨區域請求。請確定您在計劃對 Amazon Location Service 發出 API 呼叫的相同區域中建立端點。
+ 僅支援透過 Amazon Route 53 的 Amazon 提供的 DNS。如果您想要使用自己的 DNS，請使用條件式 DNS 轉送。如需詳細資訊，請參閱*《Amazon VPC 使用者指南》*中的 [DHCP 選項集](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html)。
+ 必須允許連接埠 443 上透過連接到 VPC 端點的安全群組從 VPC 的私有子網路傳入連線

您可以為啟用的每個 AWS PrivateLink 端點每秒提交最多 50，000 個請求。

**注意**  
 AWS PrivateLink 端點的網路連線逾時不在 Amazon Location 錯誤回應範圍內，需要由連線至 AWS PrivateLink 端點的應用程式妥善處理。

## 建立 Amazon Location Service 的介面端點
<a name="al-creating-vpc"></a>

您可以使用 Amazon VPC 主控台或 AWS Command Line Interface () 為 Amazon Location Service 建立介面端點AWS CLI。如需詳細資訊，請參閱《*AWS PrivateLink 指南*》中的「[建立介面端點](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html)」。

有六個不同的 VPC 端點，Amazon Location Service 提供的每個功能各一個。


| Category | Endpoint | 
| --- | --- | 
| 地圖 |  `com.amazonaws.region.geo.maps`  | 
| 位置 |  `com.amazonaws.region.geo.places`  | 
| 路由 |  `com.amazonaws.region.geo.routes`  | 
| 地理圍欄 | `com.amazonaws.region.geo.geofencing` | 
| 追蹤器 |  `com.amazonaws.region.geo.tracking`  | 
| 中繼資料 |  `com.amazonaws.region.geo.metadata`  | 

**例如： **

```
com.amazonaws.us-east-2.geo.maps
```

建立端點後，您可以選擇啟用私有 DNS 主機名稱。若要啟用，請在建立 VPC 端點時，在 Amazon VPC 主控台中選取**啟用私有 DNS 名稱**。

如果您為介面端點啟用私有 DNS，您可以使用其預設的區域 DNS 名稱向 Amazon Location Service 服務提出 API 請求。下列範例顯示預設的區域 DNS 名稱格式。
+ `maps.geo.region.amazonaws.com`
+ `places.geo.region.amazonaws.com`
+ `routes.geo.region.amazonaws.com`
+ `tracking.geo.region.amazonaws.com`
+ `geofencing.geo.region.amazonaws.com`
+ `metadata.geo.region.amazonaws.com`

先前的 DNS 名稱適用於 IPv4 網域。下列 IPV6 DNS 名稱也可以用於介面端點。
+ `maps.geo.region.api.aws`
+ `places.geo.region.api.aws`
+ `routes.geo.region.api.aws`
+ `tracking.geo.region.api.aws`
+ `geofencing.geo.region.api.aws`
+ `metadata.geo.region.api.aws`

## 從 Amazon Location 介面端點存取 Amazon Location API 操作
<a name="accessing-apis-from-interface-endpoints"></a>

您可以使用 [AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/location/)或 [AWS SDKs](https://docs.aws.amazon.com/location/latest/developerguide/dev-sdks.html)，透過 Amazon Location 介面端點存取 Amazon Location API 操作。

**範例：建立 VPC 端點**

```
aws ec2 create-vpc-endpoint \
--region us-east-1 \
--service-name location-service-name \
--vpc-id client-vpc-id \
--subnet-ids client-subnet-id \
--vpc-endpoint-type Interface \
--security-group-ids client-sg-id
```

**範例：修改 VPC 端點**

```
aws ec2 modify-vpc-endpoint \
--region us-east-1 \
--vpc-endpoint-id client-vpc-endpoint-id \
--policy-document policy-document \ #example optional parameter
--add-security-group-ids security-group-ids \ #example optional parameter 
# any additional parameters needed, see PrivateLink documentation for more details
```

## 更新內部部署 DNS 組態
<a name="updating-on-premises-dns-config"></a>

使用端點特定 DNS 名稱存取 Amazon Location 的介面端點時，您不需要更新內部部署 DNS 解析程式。您可以從公有 Amazon Location DNS 網域使用介面端點的私有 IP 地址解析端點特定的 DNS 名稱。

使用介面端點存取 Amazon Location，而不需要閘道端點或 Amazon VPC 中的網際網路閘道

Amazon VPC 中的界面端點可以透過 Amazon 網路將 Amazon VPC 應用程式和內部部署應用程式路由至 Amazon Location。

## 為 Amazon Location 建立 Amazon VPC 端點政策
<a name="creating-vpc-endpoint-policy"></a>

您可以將端點政策連接至控制 Amazon Location 存取的 Amazon VPC 端點。此政策會指定下列資訊：
+ 可執行動作的 AWS Identity and Access Management (IAM) 委託人
+ 可執行的動作
+ 可在其中執行動作的資源

**範例：**用於存取 Amazon Location Service Places APIs VPCe 政策：

```
{
	"Version": "2012-10-17",		 	 	 
	"Statement": [
		{
			"Sid": "Allow-access-to-location-service-places-opeartions",
			"Effect": "Allow",
			"Action": [
				"geo-places:*",
				"geo:*"
			],
			"Resource": [
				"arn:aws:geo-places:us-east-1::provider/default",
				"arn:aws:geo:us-east-1:*:place-index/*"
			]
		}
	]
}
```

# Amazon Location 中的組態和漏洞分析
<a name="vulnerability-analysis-and-management"></a>

組態和 IT 控制是客戶 AWS 與您之間的共同責任。如需詳細資訊，請參閱 AWS [共同的責任模型](https://aws.amazon.com/compliance/shared-responsibility-model/)。

# 預防跨服務混淆代理人
<a name="cross-service-confused-deputy-prevention"></a>

混淆代理人問題屬於安全性議題，其中沒有執行動作許可的實體可以強制具有更多許可的實體執行該動作。在 中 AWS，跨服務模擬可能會導致混淆代理人問題。在某個服務 (*呼叫服務*) 呼叫另一個服務 (*被呼叫服務*) 時，可能會發生跨服務模擬。可以操縱呼叫服務來使用其許可，以其不應有存取許可的方式對其他客戶的資源採取動作。為了預防這種情況， AWS 提供的工具可協助您保護所有服務的資料，而這些服務主體已獲得您帳戶中資源的存取權。

Amazon Location Service 不會代表您呼叫 AWS 其他 服務，因此在此情況下您不需要新增這些保護。若要進一步了解混淆代理人，請參閱*AWS Identity and Access Management 《 使用者指南*》中的[混淆代理人問題](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html)。

# Amazon Location Service 的最佳實務
<a name="best-practices"></a>

本主題提供最佳實務，協助您使用 Amazon Location Service。雖然這些最佳實務可協助您充分利用 Amazon Location Service，但不代表完整的解決方案。您應該只遵循適用於您環境的建議。

**Topics**
+ [安全](#security-best-practice)

## 安全
<a name="security-best-practice"></a>

為了協助管理甚至避免安全風險，請考慮下列最佳實務：
+ 使用聯合身分和 IAM 角色來管理、控制或限制對 Amazon Location 資源的存取。如需詳細資訊，請參《[IAM 使用者指南](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)》中的 *IAM 最佳實務*。
+ 遵循最低權限原則，僅授予對 Amazon Location Service 資源的最低必要存取權。
+ 對於 Web 應用程式中使用的 Amazon Location Service 資源，請使用 IAM `aws:referer` 條件限制存取，限制允許清單中包含的網站以外的網站使用。
+ 使用監控和記錄工具來追蹤資源存取和用量。如需詳細資訊，請參閱 AWS CloudTrail 《 使用者指南》中的 [在 Amazon Location Service 中記錄和監控](security-logging-and-monitoring.md)和記錄線索的資料事件。 [https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
+ 使用安全連線，例如以 開頭的連線`https://`，在伺服器和瀏覽器之間傳輸資料時新增安全性並保護使用者免受攻擊。

### Amazon Location Service 的 Detective 安全最佳實務
<a name="security-best-practices-detective"></a>

下列 Amazon Location Service 的最佳實務可協助偵測安全事件：

**實作 AWS 監控工具**  
監控對於事件回應至關重要，並維護 Amazon Location Service 資源和 解決方案的可靠性和安全性。您可以從 提供的數種工具和服務實作監控工具 AWS ，以監控您的 資源和其他 AWS 服務。  
例如，Amazon CloudWatch 可讓您監控 Amazon Location Service 的指標，並可讓您設定警示，以便在指標符合您設定的特定條件且達到您定義的閾值時通知您。當您建立警示時，您可以將 CloudWatch 設定為使用 Amazon Simple Notification Service 傳送提醒通知。如需詳細資訊，請參閱[在 Amazon Location Service 中記錄和監控](security-logging-and-monitoring.md)。

**啟用 AWS 記錄工具**  
記錄提供 Amazon Location Service AWS 中使用者、角色或服務所採取動作的記錄。您可以實作記錄工具 AWS CloudTrail ，例如收集動作的資料，以偵測不尋常的 API 活動。  
建立追蹤時，您可以設定 CloudTrail 來記錄事件。事件是在資源上執行的資源操作記錄，例如對 Amazon Location 提出的請求、提出請求的 IP 地址、提出請求的人員、提出請求的時間，以及其他資料。如需詳細資訊，請參閱 AWS CloudTrail 《 使用者指南》中的[記錄線索的資料事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)。

### Amazon Location Service 的預防性安全最佳實務
<a name="security-best-practices-preventive"></a>

下列 Amazon Location Service 的最佳實務有助於防止安全事件：

**使用安全連線**  
一律使用加密連線，例如開頭為 `https://` 的連線，以確保傳輸中敏感資訊的安全。

**實作 資源的最低權限存取**  
當您建立 Amazon Location 資源的自訂政策時，請僅授予執行任務所需的許可。建議從最小的一組許可開始，然後依需要授予額外的許可。對降低錯誤或惡意攻擊所引起的安全風險和影響而言，實作最低權限存取是相當重要的一環。如需詳細資訊，請參閱[使用 AWS Identity and Access Management 進行身分驗證](security-iam.md)。

**使用全域唯一 IDs做為裝置 IDs**  
針對裝置 IDs 使用以下慣例。  
+ 裝置 IDs 必須是唯一的。
+ 裝置 IDs不應是秘密，因為它們可以用作其他系統的外部金鑰。
+ 裝置 IDs不應包含個人身分識別資訊 (PII)，例如電話裝置 IDs或電子郵件地址。
+ 裝置 IDs 不應可預測。建議使用 UUIDs等不透明識別符。

**請勿在裝置位置屬性中包含 PII**  
傳送裝置更新時 （例如，使用 [DevicePositionUpdate](https://docs.aws.amazon.com/location/latest/APIReference/API_WaypointTracking_DevicePositionUpdate.html))，請勿在 中包含個人身分識別資訊 (PII)，例如電話號碼或電子郵件地址`PositionProperties`。