bash - 有没有办法使用 cli 关闭和启动 AWS redshift 集群?

标签 bash amazon-web-services amazon-redshift aws-cli

我只是启动一个 redshift 集群来开始开发工作,并且通常使用 cron 服务在工作时间以外关闭我的所有开发资源以节省资金。

当我浏览 aws cli 帮助时:

aws redshift help

我没有看到任何停止或关闭我的测试集群的选项,就像我在控制台中看到的那样。

如果没有办法做到这一点,有人知道他们为什么不提供此功能吗?这些实例保持在线状态非常昂贵,我不想每晚都手动关闭它们。

最佳答案

听起来您正在寻找:

来自 aws-cli aws redshift delete-cluster documentation :

If you want to shut down the cluster and retain it for future use, set SkipFinalClusterSnapshot to "false" and specify a name for FinalClusterSnapshotIdentifier . You can later restore this snapshot to resume using the cluster. If a final cluster snapshot is requested, the status of the cluster will be "final-snapshot" while the snapshot is being taken, then it's "deleting" once Amazon Redshift begins deleting the cluster.

示例用法,再次来自文档:

# When shutting down at night...
aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier my-snapshot-id

# When starting up in the morning...
aws redshift restore-from-cluster-snapshot --cluster-identifier mycluster --snapshot-identifier my-snapshot-id

关于bash - 有没有办法使用 cli 关闭和启动 AWS redshift 集群?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28332995/

相关文章:

arrays - Bash:如何声明空数组,然后向其中添加变量

bash - 文件描述符权限被 bash 进程替换拒绝?

regex - 基于正则表达式的 grep 不匹配任何内容

amazon-web-services - 如何将 Netbeans 上的 Java Webapp 部署到 AWS?

amazon-web-services - INSERT INTO table SELECT Redshift 超慢

java - 从 Java 在 Linux 上执行 grep 命令总是返回 null

c# - 使用 KMS 加密的 S3 PutObject 失败并出现 403 "Access Denied"错误

python - 是否可以在 AWS Lambda 环境中正确指向 Python Shapely 库的 LIBGEOS_C?

python - 在 Redshift 中创建 Python UDF 以替换字符串中的字符

python - Redshift 中的长真空