LinuxCommandLibrary

aws-rds

Manage Amazon Relational Database Service (RDS) instances

TLDR

Display help for a specific RDS subcommand

$ aws rds [subcommand] help
copy

Stop instance
$ aws rds stop-db-instance --db-instance-identifier [instance_identifier]
copy

Start instance
$ aws rds start-db-instance --db-instance-identifier [instance_identifier]
copy

Modify an RDS instance
$ aws rds modify-db-instance --db-instance-identifier [instance_identifier] [parameters] --apply-immediately
copy

Apply updates to an RDS instance
$ aws rds apply-pending-maintenance-action --resource-identifier [database_arn] --apply-action [system-update] --opt-in-type [immediate]
copy

Change an instance identifier
$ aws rds modify-db-instance --db-instance-identifier [old_instance_identifier] --new-db-instance-identifier [new_instance_identifier]
copy

Reboot an instance
$ aws rds reboot-db-instance --db-instance-identifier [instance_identifier]
copy

Delete an instance
$ aws rds delete-db-instance --db-instance-identifier [instance_identifier] --final-db-snapshot-identifier [snapshot_identifier] --delete-automated-backups
copy

SYNOPSIS

aws rds []

PARAMETERS

--debug
    Turn on debug logging.

--endpoint-url
    Override command's default URL with the given URL.

--no-verify-ssl
    Disable SSL certificate verification.

--no-paginate
    Disable automatic pagination.

--output
    The formatting style for command output (json, text, table).

--query
    Use a JMESPath query to filter the output.

--profile
    Use a specific profile from your credential file.

--region
    The region to use. Overrides config/env settings.

--version
    Display the AWS CLI version.

DESCRIPTION

The `aws rds` command is part of the AWS Command Line Interface (CLI). It provides a way to interact with the Amazon Relational Database Service (RDS) from the command line. This includes managing database instances, security groups, parameter groups, snapshots, and other RDS resources. It allows users to automate tasks such as creating, modifying, deleting, and monitoring RDS resources, without having to use the AWS Management Console. The AWS CLI simplifies administration and integration with scripts and other automation tools.

It offers a comprehensive suite of subcommands for various RDS operations. Properly configured AWS credentials are required to use this command effectively. Using `aws rds` is crucial for Infrastructure as Code practices when managing AWS RDS infrastructure.

The AWS CLI uses the configured AWS credentials and region to authenticate and authorize requests to the AWS RDS service. The output format (e.g., JSON, text, table) can be configured using CLI options, providing flexibility in how the data is presented.

CAVEATS

Requires AWS CLI to be installed and properly configured with AWS credentials and region. API calls are subject to AWS RDS service limits and throttling.

SUBCOMMANDS

The `aws rds` command offers a wide array of subcommands, including `create-db-instance`, `modify-db-instance`, `delete-db-instance`, `describe-db-instances`, `create-db-snapshot`, `restore-db-instance-from-db-snapshot`, and many more. Each subcommand allows to manage different aspects of the RDS service. Use `aws rds help` or `aws rds help` for specific subcommand documentation.

AUTHENTICATION

Authentication to AWS services is crucial. The AWS CLI relies on configured credentials, typically stored in `~/.aws/credentials`. Credentials can also be provided via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or IAM roles assigned to EC2 instances. Ensure that the credentials used have the necessary permissions to perform the desired RDS operations.

ERROR HANDLING

When using `aws rds`, be aware of potential errors. Common errors include invalid parameter values, insufficient IAM permissions, and exceeding service limits. The CLI will typically provide error messages to help diagnose and resolve these issues. Reviewing the AWS documentation for RDS error codes is helpful for troubleshooting.

HISTORY

The `aws rds` command has evolved alongside the AWS CLI and the Amazon RDS service. Initially, interacting with RDS required using the AWS Management Console or custom API calls. The introduction of the AWS CLI, and subsequently the `aws rds` command, simplified automation and management of RDS resources. Updates to the command have tracked feature additions and changes within Amazon RDS itself. The command is constantly updated to support new RDS features and improvements. The history is directly correlated to the development of the AWS RDS service as a whole.

SEE ALSO

aws ec2(1), aws iam(1), aws s3(1)

Copied to clipboard