📜  aws cli stop rds 实例 (1)

📅  最后修改于: 2023-12-03 14:39:25.143000             🧑  作者: Mango

AWS CLI Stop RDS Instance

AWS CLI is a command-line tool to interact with various AWS services. In this tutorial, we will learn how to stop an RDS instance using the AWS CLI.

Prerequisites

To follow this tutorial, you need to have the following:

  • An AWS account
  • AWS CLI installed on your computer
  • Access keys for the AWS account
Steps
  1. Open a terminal or command prompt.
  2. Type the following command to stop the RDS instance:
aws rds stop-db-instance --db-instance-identifier <instance-name>

Replace <instance-name> with the identifier of your RDS instance.

For example:

aws rds stop-db-instance --db-instance-identifier mydbinstance

This command will stop the RDS instance with the identifier mydbinstance.

  1. You can check the status of your RDS instance using the following command:
aws rds describe-db-instances --db-instance-identifier <instance-name>

Replace <instance-name> with the identifier of your RDS instance.

For example:

aws rds describe-db-instances --db-instance-identifier mydbinstance

This command will describe the properties of the RDS instance with the identifier mydbinstance, including its status.

Conclusion

In this tutorial, we learned how to stop an RDS instance using the AWS CLI. You can use this command when you want to stop your RDS instance temporarily or permanently. Remember to check the status of your instance after running the command to confirm that it has been stopped.