AWS RDS Instance Logs

AWS RDS Instance Logs

AWS RDS instance logs

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed AWS RDS instance events and event subscriptions.

https://cloudaffaire.com/aws-rds-instance-events/

In this blog post, we will discuss AWS RDS logs. We will also publish AWS RDS logs in CloudWatch.

Logging:

Logging helps database administrator to identify and troubleshoot issues in a database instance. Almost all RDBMS system generates some form of logs. AWS RDS PostgreSQL generates error log and query logs which can be viewed using AWS console, AWS CLI or through API call. By default, error logs are published under AWS RDS console ‘Logs and events’ section. In addition, you can publish PostgreSQL general logs and upgrade logs in CloudWatch.

Note: Viewing, downloading, or watching transaction logs is not supported.

Next, we are going view AWS RDS PostgreSQL error logs through the console and also publish log in CloudWatch.

Prerequisites for this demo:

  • AWS RDS PostgreSQL instance.

AWS RDS instance logs:

Step 1: Login to AWS console and navigate to ‘RDS’.

AWS RDS Instance Logs

Step 2: In the navigation pane, click ‘Databases’ and then click on your AWS RDS instance.

AWS RDS Instance Logs

Step 3: Navigate to ‘Logs’ located under ‘Logs & events’ tab. Select the latest error log and click ‘View’.

AWS RDS Instance Logs

AWS RDS Instance Logs

AWS RDS Instance Logs

Next, we are going to publish the PostgreSQL query log in CloudWatch.

Step 5: Navigate to ‘Databases’ and select your RDS instance, click ‘Modify’.

AWS RDS Instance Logs

Step 6: Navigate to ‘Log exports’ section and enable ‘PostgreSQL log’, save the configuration.

AWS RDS Instance Logs

AWS RDS Instance Logs

You can view published logs under CloudWatch ‘Logs’ section.

AWS RDS Instance Logs

Hope you have enjoyed this article, In the next blog post, we will discuss AWS RDS parameter groups.

To get more details on AWS RDS, please refer below AWS documentation

https://docs.aws.amazon.com/rds/index.html

 

Leave a Reply

Close Menu