Aurora Serverless - query logs

0

Hi,
I'm just getting started with RDS, and Aurora Serverless in particular. Database setup went fine, I was able to get connected to it with MySQL workbench without any major issues.

But I can't seem to locate the Aurora Serverless query logs?

According to:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html

To view a database log file
1 Open the Amazon RDS console at https://console.aws.amazon.com/rds/.
2 In the navigation pane, choose Databases.
3 Choose the name of the DB instance that has the log file that you want to view.
4 Choose the Logs & events tab.
5 Scroll down to the Logs section.
6 In the Logs section, choose the log that you want to view, and then choose View.

I get down to step 4, the "Logs & Events" tab; but there's just a "Recent Events" panel with a couple scaling events.

There is no "Logs section"?! Where do I find the query log, or the error log?

asked 4 years ago1100 views
2 Answers
0
Accepted Answer

Hi,

The steps required for Aurora Serverless differ from those of RDS MySQL, in order to see the logs publishing to CloudWatch will need to be turned on once that is done, the logs specified will be visible from cloud watch [1].

In order allow the publishing of logs to cloud watch, you will need to create a custom cluster parameter group then attach it to your Aurora cluster. To create a cluster parameter group; navigate to the RDS console on the left pane select Parameter groups, create parameter group, under the parameter group family select “aurora5.6”, give the parameter group a name and description, then save [2].

From the list of parameter groups click on the one you just created, click on Edit parameters depending on the logs required modify the values as follows:

For general logs, set the value of parameter' general_log to 1
For slow query logs, set slow_query_log to 1
For long time query, set long_query_log to 0.1 (s) or a value of your choosing

Once the changes are saved, navigate to Databases select the Aurora cluster, modify and under Additional configuration, choose the DB cluster group from the drop down list. Click continue and apply immediately this will reboot the clustewr then apply the changes onto the cluster, once the cluster is in the available state logs will be available from cloud watch.

Hope this helps!

/MrK

References:
[1] https://aws.amazon.com/about-aws/whats-new/2019/02/amazon-aurora-serverless-publishes-logs-to-amazon-cloudwatch/
[2] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html#USER_WorkingWithParamGroups.CreatingCluster

MrK
answered 4 years ago
0

Thanks, I had actually already done the custom parameter group and applied it.
I just couldn't figure out where to go to see the results. I was still looking under 'events and logs' under the database; I didn't realize i had to go to a completely separate "CloudWatch" dashboard.

I've found it now! Thanks.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions