AWS命令行界面 - 启动数据库实例

时间:2017-09-27 16:53:48

标签: amazon-web-services amazon-rds aws-cli

据我所知,Amazon RDS支持停止和启动数据库实例。 我正在从Mac OS Sierra运行该实例 我想使用AWS命令行界面(遵循本教程:http://docs.aws.amazon.com/cli/latest/reference/rds/start-db-instance.html

启动数据库实例

但不知怎的,我收到了一个错误:

MacBook-Pro-de-lopes:~ lopes$ aws rds start-db-instance lopesdbtest
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

add-source-identifier-to-subscription    | add-tags-to-resource                    
apply-pending-maintenance-action         | authorize-db-security-group-ingress     
copy-db-cluster-snapshot                 | copy-db-parameter-group                 
copy-db-snapshot                         | copy-option-group                       
create-db-cluster                        | create-db-cluster-parameter-group       
create-db-cluster-snapshot               | create-db-instance                      
create-db-instance-read-replica          | create-db-parameter-group               
create-db-security-group                 | create-db-snapshot                      
create-db-subnet-group                   | create-event-subscription               
create-option-group                      | delete-db-cluster                       
delete-db-cluster-parameter-group        | delete-db-cluster-snapshot              
delete-db-instance                       | delete-db-parameter-group               
delete-db-security-group                 | delete-db-snapshot                      
delete-db-subnet-group                   | delete-event-subscription               
delete-option-group                      | describe-account-attributes             
describe-certificates                    | describe-db-cluster-parameter-groups    
describe-db-cluster-parameters           | describe-db-cluster-snapshots           
describe-db-clusters                     | describe-db-engine-versions             
describe-db-instances                    | describe-db-log-files                   
describe-db-parameter-groups             | describe-db-parameters                  
describe-db-security-groups              | describe-db-snapshot-attributes         
describe-db-snapshots                    | describe-db-subnet-groups               
describe-engine-default-cluster-parameters | describe-engine-default-parameters      
describe-event-categories                | describe-event-subscriptions            
describe-events                          | describe-option-group-options           
describe-option-groups                   | describe-orderable-db-instance-options  
describe-pending-maintenance-actions     | describe-reserved-db-instances          
describe-reserved-db-instances-offerings | download-db-log-file-portion            
failover-db-cluster                      | list-tags-for-resource                  
modify-db-cluster                        | modify-db-cluster-parameter-group       
modify-db-instance                       | modify-db-parameter-group               
modify-db-snapshot-attribute             | modify-db-subnet-group                  
modify-event-subscription                | promote-read-replica                    
purchase-reserved-db-instances-offering  | reboot-db-instance                      
remove-source-identifier-from-subscription | remove-tags-from-resource               
reset-db-cluster-parameter-group         | reset-db-parameter-group                
restore-db-cluster-from-snapshot         | restore-db-cluster-to-point-in-time     
restore-db-instance-from-db-snapshot     | restore-db-instance-to-point-in-time    
revoke-db-security-group-ingress         | add-option-to-option-group              
remove-option-from-option-group          | wait                                    
help                                    


Invalid choice: 'start-db-instance', maybe you meant:

  * reboot-db-instance
  * create-db-instance

2 个答案:

答案 0 :(得分:2)

您需要更新到最新版本的AWS CLI工具。您当前安装的版本是在RDS启动/停止功能可用之前发布的。

答案 1 :(得分:1)

这是一项新功能(于2017年6月1日公布)。您必须升级AWS CLI。

Amazon RDS Supports Stopping and Starting of Database Instances