

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

# 存取 Amazon Keyspaces （適用於 Apache Cassandra)
<a name="accessing"></a>

您可以使用主控台、透過執行`cqlsh`用戶端、 AWS SDK AWS CloudShell或使用 Apache 2.0 授權的 Cassandra 驅動程式，以程式設計方式存取 Amazon Keyspaces。Amazon Keyspaces 支援與 Apache Cassandra 3.11.2 相容的驅動程式和用戶端。存取 Amazon Keyspaces 之前，您必須完成設定， AWS Identity and Access Management 然後將 IAM 身分存取許可授予 Amazon Keyspaces。

## 設定 AWS Identity and Access Management
<a name="SettingUp.IAM"></a>

### 註冊 AWS 帳戶
<a name="sign-up-for-aws"></a>

若要開始使用 AWS，您需要 AWS 帳戶。如需建立 的相關資訊 AWS 帳戶，請參閱《 *AWS 帳戶管理 參考指南*》中的 [入門 AWS 帳戶](https://docs.aws.amazon.com//accounts/latest/reference/getting-started.html)。

## 設定 Amazon Keyspaces
<a name="SettingUp.KEY"></a>

 使用 [IAM ](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html)管理對 Amazon Keyspaces 資源的存取。使用 IAM，您可以將政策連接至 IAM 使用者、角色和聯合身分，以授予 Amazon Keyspaces 中特定資源的讀取和寫入許可。

若要開始授予 IAM 身分的許可，您可以使用 Amazon Keyspaces 的其中一個 AWS 受管政策：
+ [AmazonKeyspacesFullAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonKeyspacesFullAccess.html) – 此政策授予存取 Amazon Keyspaces 中所有資源的許可，並完整存取所有功能。
+ [AmazonKeyspacesReadOnlyAccess\_v2](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonKeyspacesReadOnlyAccess_v2.html) – 此政策會將唯讀許可授予 Amazon Keyspaces。

如需受管政策中定義之動作的詳細說明，請參閱 [AWS Amazon Keyspaces 的 受管政策](security-iam-awsmanpol.md)。

若要限制 IAM 身分可執行的動作範圍，或限制身分可存取的資源，您可以建立使用 `AmazonKeyspacesFullAccess`受管政策做為範本的自訂政策，並移除不需要的所有許可。您也可以限制對特定金鑰空間或資料表的存取。如需如何限制動作或限制存取 Amazon Keyspaces 中特定資源的詳細資訊，請參閱 [Amazon Keyspaces 如何與 IAM 搭配使用](security_iam_service-with-iam.md)。

若要在建立 AWS 帳戶 並建立授予 IAM 身分存取 Amazon Keyspaces 的政策之後存取 Amazon Keyspaces，請繼續下列其中一個區段：
+ [使用主控台](console_keyspaces.md)
+ [使用 AWS CloudShell](using-aws-with-cloudshell.md)