Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create RDS aurora-mysql5.7 via CloudFormation with EnableCloudwatchLogsExports parameter

I've got CloudFormation template that I'm using to create RDS aurora-mysql5.7 cluster.

I'm trying to add EnableCloudwatchLogsExports parameter to it:

  RDSCluster:
    Type: AWS::RDS::DBCluster
    Properties: 
      EnableCloudwatchLogsExports: 
        - String

And there is a question... All my attempts with 'error', 'errors', 'error log' itp. finished with rollback and error message:

You cannot use the log types 'error logs' with engine version aurora-mysql 5.7.12. For supported log types, see the documentation. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 16f5c442-6969-44aa-a67e-12f9ca524055)

I'd like to publish Audit, Error, General and Slow query logs to CloudWatch. I can't find in docs what are the 'allowed' supported values for this property.

like image 591
kkarczewski Avatar asked Sep 21 '25 01:09

kkarczewski


1 Answers

Try out the following:

  • Try to specify the log types as follows:
RDSCluster:
    Type: AWS::RDS::DBCluster
    Properties: 
      EnableCloudwatchLogsExports: 
        - "error"
        - "general"
        - "slowquery"
        - "audit"
  • Make sure the DB Cluster Parameter Group used has advanced auditing enabled. For example: server_audit_logging has value ON. Reference: Using Advanced Auditing with an Amazon Aurora MySQL DB Cluster

  • If the above 2 approaches didn't work, try to change the MySQL version.

like image 126
Abdullah Khawer Avatar answered Sep 22 '25 22:09

Abdullah Khawer