πŸš€ DevOps & SRE Certification Program πŸ“… Starting: 1st of Every Month 🀝 +91 8409492687 πŸ” Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

AWS Tutorials: How to Shutdown (Stop / Start) Relational Database Service?

To shutdown (stop) and start a Relational Database Service (RDS) instance in AWS, you can follow these steps:

Stopping an RDS Instance

  1. Sign in to the AWS Management Console: Go to the AWS Management Console and sign in with your credentials.
  2. Navigate to the RDS Dashboard: In the AWS Management Console, open the RDS dashboard by searching for β€œRDS” in the services menu or directly selecting β€œRDS” from the services list.
  3. Select the RDS Instance: In the RDS dashboard, select β€œDatabases” from the navigation pane to view your instances. Find the RDS instance you want to stop.
  4. Stop the Instance:
    • Select the checkbox next to the RDS instance you want to stop.
    • Click on the β€œActions” dropdown menu.
    • Choose β€œStop” from the list of actions.
  5. Confirm the Stop Action: A confirmation dialog will appear. Confirm that you want to stop the instance by clicking β€œStop.”

Starting an RDS Instance

  1. Sign in to the AWS Management Console: Go to the AWS Management Console and sign in with your credentials.
  2. Navigate to the RDS Dashboard: In the AWS Management Console, open the RDS dashboard.
  3. Select the RDS Instance: In the RDS dashboard, select β€œDatabases” from the navigation pane to view your instances. Find the RDS instance you want to start.
  4. Start the Instance:
    • Select the checkbox next to the RDS instance you want to start.
    • Click on the β€œActions” dropdown menu.
    • Choose β€œStart” from the list of actions.
  5. Confirm the Start Action: A confirmation dialog will appear. Confirm that you want to start the instance by clicking β€œStart.”

AWS Command Line Interface (CLI) to stop and start an RDS instance

Stop RDS Instance:

$ aws rds stop-db-instance --db-instance-identifier your-db-instance-identifier

Start RDS Instance:


$ aws rds start-db-instance --db-instance-identifier your-db-instance-identifier

Replace your-db-instance-identifier with the identifier of your RDS instance.

Script for Stopping and Starting RDS Instance

#!/bin/bash
# Define your RDS instance identifier
DB_INSTANCE_IDENTIFIER="your-db-instance-identifier"
# Function to stop the RDS instance
stop_rds() {
echo "Stopping RDS instance: $DB_INSTANCE_IDENTIFIER"
aws rds stop-db-instance --db-instance-identifier $DB_INSTANCE_IDENTIFIER
if [ $? -eq 0 ]; then
echo "RDS instance stopped successfully."
else
echo "Failed to stop RDS instance."
fi
}
# Function to start the RDS instance
start_rds() {
echo "Starting RDS instance: $DB_INSTANCE_IDENTIFIER"
aws rds start-db-instance --db-instance-identifier $DB_INSTANCE_IDENTIFIER
if [ $? -eq 0 ]; then
echo "RDS instance started successfully."
else
echo "Failed to start RDS instance."
fi
}
# Main script logic
case "$1" in
stop)
stop_rds
;;
start)
start_rds
;;
*)
echo "Usage: $0 {stop|start}"
exit 1
;;
esac
view raw manage_rds.sh hosted with ❀ by GitHub
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x