【问题标题】:How to access Amazon Keyspaces via shell?如何通过 shell 访问 Amazon Keyspaces?
【发布时间】:2021-08-29 12:27:39
【问题描述】:

我尝试在 AWS shell 中写入 cqlsh,但它没有返回任何输出。我提到了这个tutorial

输出:-bash: cqlsh: command not found

【问题讨论】:

  • 在 aws shell 中我如何访问它?
  • “AWS Shell”是什么意思?您是指 AWS CloudShell 吗?文档说 cqlsh 是作为 Cassandra 的一部分安装的,但您可能不想在 CloudShell 中安装它。
  • 是的,我无法在 cloudshell 中访问它
  • cqlsh 是 Cassandra 的一部分,但 CloudShell 没有安装 Cassandra。我怀疑那里可能没有足够的磁盘空间来安装 Cassandra。

标签: amazon-web-services cassandra nosql amazon-keyspaces wide-column-store


【解决方案1】:

是的,您可以使用 cqlsh 通过 AWS Cloudshell 访问 Amazon Keyspaces。 Amazon Keyspaces 工具包的存储库有一个 shell 脚本,用于在 AWS 云 shell 中设置 cqlsh。 Amazon Keyspaces 工具包是为 Amazon Keyspaces 中的最佳实践配置的常用开发人员工具的存储库。

这里是 github 示例的链接:https://github.com/aws-samples/amazon-keyspaces-toolkit/tree/master/aws-cloudshell

以下是帮助您入门的步骤。

运行以下命令下载并执行安装脚本 wgethttps://raw.githubusercontent.com/aws-samples/amazon-keyspaces-toolkit/master/aws-cloudshell/setup.sh bash setup.sh

通过使用 cqlsh-expansion 它还允许您使用 Sigv4 身份验证方法,该方法支持 Python Cassandra 驱动程序。如需更多信息,请访问 Github 页面,了解我们的 Sigv4 插件和 Python 驱动程序 https://github.com/aws/aws-sigv4-auth-cassandra-python-driver-plugin。

该插件依赖于 AWS SDK for Python (Boto3),使用 boto3.Session 获取凭证以使用 cqlsh-expansion 连接到 Amazon 密钥空间

cqlsh-expansion cassandra.us-east-2.amazonaws.com 9142 --ssl --auth-provider "SigV4AuthProvider"

附加信息 cqlsh 扩展https://github.com/aws-samples/amazon-keyspaces-toolkit/tree/master/cqlsh-expansion#readme AWS CloudShell https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html

【讨论】:

    猜你喜欢
    • 2020-10-08
    • 1970-01-01
    • 2017-02-05
    • 2021-05-08
    • 2021-10-15
    • 2011-10-21
    • 2021-01-31
    • 1970-01-01
    • 2018-08-09
    相关资源
    最近更新 更多