How to enable slow query and general logs for Aurora Serverless

During a project we are migrating a lot of MySQL RDS instances to Aurora Serverless basically to lower runtime and operational cost (OPEX).

In the traditional Aurora / MySQL RDS Cluster you could see logging on RDS instance level and also view/download them through the console. However for Aurora Serverless this feature is missing.

To enable general and slow query logs you can however set the following value in a custom attached DBClusterParameterGroup.

    Type: AWS::RDS::DBClusterParameterGroup
      Description: !Sub 'terra10-${ENV}-parametergroup'
      Family: aurora5.6
        general_log: '1'
        slow_query_log: '1'
        - Key: Name
          Value: !Sub 'terra10-${ENV}-parametergroup'

In AWS CloudWatch the  error logstream is always there by default:


But thanks to the added parameters both the general and slowquery logstreams should appear on respectively their first new log event.

Hope it helps.