{"id":16792,"date":"2022-03-05T07:59:10","date_gmt":"2022-03-05T07:59:10","guid":{"rendered":"https:\/\/www.accuwebhosting.com\/blog\/?p=16792"},"modified":"2025-09-15T11:16:02","modified_gmt":"2025-09-15T11:16:02","slug":"export-rds-logs-to-s3-bucket-automatically","status":"publish","type":"post","link":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/","title":{"rendered":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?"},"content":{"rendered":"<p>&nbsp;<\/p><p><img decoding=\"async\" data-attachment-id=\"16636\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/affiliate\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/affiliate-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"affiliate\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/affiliate-1024x683.jpg\" class=\"aligncenter wp-image-16636\" title=\"Export RDS logs to S3 Bucket\" src=\"\" alt=\"Export RDS logs to S3 Bucket\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg\"><\/p><p>Before we learn how to automatically Export RDS Audit logs to S3, did you know AWS CloudWatch automatically stores RDS DB logs? Yes, they do, but, they only store the general logs for your DB instance. Now, what if you want to find a specific query or data from the log? Which user performed a particular query or from which IP Address? Who deleted certain records from your DB tables?<\/p><p>Also, somehow you have managed to export all audit logs of your RDS instance to CloudWatch, which is great. But, do you know? CloudWatch will retain those logs for 30 days only!! To retain them for a longer period, you need to export CloudWatch logs to the S3 bucket. You can do this manually from the CloudWatch dashboard. But, what if you want to have automation for this?<\/p><p>This guide will walk you through all the steps required to log all such events automatically!!<\/p><div class=\"acc-blog-button\"><a href=\"https:\/\/www.accuwebtech.com\/hire-developers\/hire-aws-developer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-wpel-link=\"internal\"><span class=\" virtual-button\">Looking for AWS EXPERTS? CHECKOUT HERE<\/span><\/a><\/div><div class=\"extra-top-space\"><\/div><p><b>This guide includes:<\/b><\/p><p>1) Tweak RDS settings to send audit logs to CloudWatch<br>\n2) Create an S3 Bucket (To Store CloudWatch Audit Logs)<br>\n3) Create IAM Role (We will use this for Lambda automation)<br>\n4) Lambda (Function to automate CloudWatch Logs export to S3)<\/p><p>Let&rsquo;s begin!<\/p><h2>Tweak RDS Settings to Send Audit Logs to CloudWatch<\/h2><p>First of all, we need to tweak the RDS to send specific logs to CloudWatch. To do this, we will create one Option Group and one Parameter Group.<\/p><h3>Create Option Group<\/h3><p>&rArr; Visit your Amazon RDS Dashboard.<br>\n&rArr; Go to the Option Group.<br>\n&rArr; Click on the Create Group button.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/1-option-group-1.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Create an Option Group\" src=\"\" alt=\"Create an Option Group\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/1-option-group-1.png\"><\/a><\/p><p>&rArr; Enter the Name and Description for this group.<br>\n&rArr; Select Engine: mysql and Engine Version: 8.0. Click on Create.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/2-option-group-2.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Create an Option Group\" src=\"\" alt=\"Create an Option Group\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/2-option-group-2.png\"><\/a><\/p><p>&rArr; Click on the Option Group that you have created.<br>\n&rArr; Under Options section, click on Add option button.<br>\n&rArr; Under &ldquo;SERVER_AUDIT_EVENTS*&rdquo; option, enter the values that you want to audit i.e. CONNECT, QUERY, QUERY_DDL, QUERY_DML, QUERY_DCL, QUERY_DML_NO_SELECT. If you want to log all the queries run on your tables, just enter QUERY in this field.<br>\n&rArr; Set &ldquo;Yes&rdquo; for Apply Immediately. Click on Add Option.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/3-option-group-3.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Option Group Settings\" src=\"\" alt=\"Option Group Settings\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/3-option-group-3.png\"><\/a><\/p><div class=\"extra-top-space\"><\/div><div class=\"acc-blog-button\"><a href=\"https:\/\/www.accuwebtech.com\/hire-developers\/hire-aws-developer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-wpel-link=\"internal\"><span class=\" virtual-button\">Looking for AWS EXPERTS? CHECKOUT HERE<\/span><\/a><\/div><div class=\"extra-top-space\"><\/div><h3>Create Parameter Group<\/h3><p>&rArr; Let&rsquo;s open the Amazon RDS Dashboard.<br>\n&rArr; Click on the Parameter Group.<br>\n&rArr; Click on the Create Parameter Group button.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/4-parameter-group-1.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Create Parameter Group\" src=\"\" alt=\"Create Parameter Group\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/4-parameter-group-1.png\"><\/a><\/p><p>&rArr; Select &ldquo;Parameter group family&rdquo;: mysql8.0<br>\n&rArr; Select &ldquo;Type&rdquo;: DB Parameter Group<br>\n&rArr; Enter Group Name and Description. Click on Create.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/5-parameter-group-2.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Create Parameter Group\" src=\"\" alt=\"Create Parameter Group\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/5-parameter-group-2.png\"><\/a><\/p><p>&rArr; Now, click on the parameter Group that you have created.<br>\n&rArr; Under Parameter, we will edit the certain parameters and set the following values:<br>\n&rArr; Edit parameter: &ldquo;log_output&rdquo; &rArr; Change its value from TABLE to FILE<br>\n&rArr; Edit parameter: &ldquo;slow_query_log&rdquo; &rArr; Change its value from BLANK to 1<br>\n&rArr; Edit parameter: &ldquo;general_log&rdquo; &rArr; Change its value from BLANK to 1<\/p><p>Now, we are all set with our Option Group and Parameter Group. Now, let&rsquo;s allocate these groups to our RDS.<\/p><p>&rArr; Go to your RDS Dashboard.<br>\n&rArr; Click on the RDS that you have created.<br>\n&rArr; Click on Modify.<br>\n&rArr; Scroll down the page and go to the &ldquo;Database options&rdquo; section.<br>\n&rArr; Under &ldquo;DB parameter group&rdquo;, select the parameter group that you have created.<br>\n&rArr; Under &ldquo;Option group&rdquo;, select the option group that you have created.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/6-modify-rds.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Tweak RDS Settings\" src=\"\" alt=\"Tweak RDS Settings\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/6-modify-rds.png\"><\/a><\/p><p>We are now all set with the RDS. Once you are done with the above steps, kindly allow 20-30 minutes to populate the data in CloudWatch (NOTE: It may take more time depending on the size of the logs).<\/p><p>Once CloudWatch has gathered all the logs, you will see the audit logs under your CloudWatch Dashboard. It will look like the following image:<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/7-cloudwatch.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"CloudWatch Log Groups\" src=\"\" alt=\"CloudWatch Log Groups\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/7-cloudwatch.png\"><\/a><\/p><div class=\"extra-top-space\"><\/div><div class=\"acc-blog-button\"><a href=\"https:\/\/www.accuwebtech.com\/hire-developers\/hire-aws-developer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-wpel-link=\"internal\"><span class=\" virtual-button\">Looking for AWS EXPERTS? CHECKOUT HERE<\/span><\/a><\/div><div class=\"extra-top-space\"><\/div><h2>Create an S3 Bucket (To Store CloudWatch Audit Logs)<\/h2><p>&rArr; Go to Amazon S3 Dashboard.<br>\n&rArr; Create a new Bucket.<br>\n&rArr; Once you have created a bucket, open it and navigate to the Permissions tab.<br>\n&rArr; We will need to allow CloudWatch to put objects to the bucket (Write Access)<br>\n&rArr; Click on Edit button for Bucket policy. Enter the following code:<\/p><pre>{\n\"Version\": \"2012-10-17\",\n\"Statement\": [\n{\n\"Effect\": \"Allow\",\n\"Principal\": {\n\"Service\": \"logs.YOUR-REGION.amazonaws.com\" \n\/\/ i.e. logs.us-east-1.amazonaws.com\n},\n\"Action\": \"s3:GetBucketAcl\",\n\"Resource\": \"arn:aws:s3:::BUCKET_NAME_HERE\"\n},\n{\n\"Effect\": \"Allow\",\n\"Principal\": {\n\"Service\": \"logs.YOUR-REGION.amazonaws.com\"\n},\n\"Action\": \"s3:PutObject\",\n\"Resource\": \"arn:aws:s3:::BUCKET_NAME_HERE\/*\",\n\"Condition\": {\n\"StringEquals\": {\n\"s3:x-amz-acl\": \"bucket-owner-full-control\"\n}\n}\n}\n]\n}<\/pre><div class=\"extra-top-space\"><\/div><h2>Create IAM Role (We will use this for Lambda automation)<\/h2><p>Now, we will create the IAM role that will be used in the Lambda function set up. The AWS Lambda service will require permission to log events and write to the S3 bucket we have created.<\/p><p>We will create the IAM Role &ldquo;Export-RDS-CloudWatch-to-S3-Lambda&rdquo; with &ldquo;AmazonS3FullAccess&rdquo;, &ldquo;CloudWatchLogsFullAccess&rdquo;, and &ldquo;CloudWatchEventsFullAccess&rdquo; policies.<\/p><p>&rArr; Open your AWS IAM Dashboard.<br>\n&rArr; Switch to the Roles and click on the Create Role button.<br>\n&rArr; Under &ldquo;Use case&rdquo;, select Lambda and click on Next.<br>\n&rArr; Search for &ldquo;AmazonS3FullAccess&rdquo; and select it.<br>\n&rArr; Search for &ldquo;CloudWatchLogsFullAccess&rdquo; and select it.<br>\n&rArr; Search for &ldquo;CloudWatchEventsFullAccess&rdquo; and select it.<br>\n&rArr; Set Role Name: &ldquo;Export-RDS-CloudWatch-to-S3-Lambda&rdquo; and click on Create role.<\/p><div class=\"extra-top-space\"><\/div><div class=\"acc-blog-button\"><a href=\"https:\/\/www.accuwebtech.com\/hire-developers\/hire-aws-developer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-wpel-link=\"internal\"><span class=\" virtual-button\">Looking for AWS EXPERTS? CHECKOUT HERE<\/span><\/a><\/div><div class=\"extra-top-space\"><\/div><h2>Lambda (Function to automate CloudWatch Logs export to S3)<\/h2><p>Lambda function allows you to put your code under the function and run it on triggers. You do not need to have any server or set up for this. Very easy and efficient!<\/p><p>&rArr; Switch to AWS Lambda Dashboard.<br>\n&rArr; Click on the Functions and then click on the Create function button.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/8-lambda-functions.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Create Lambda Function\" src=\"\" alt=\"Create Lambda Function\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/8-lambda-functions.png\"><\/a><\/p><p>&rArr; Keep &ldquo;Author for Scratch&rdquo; selected.<br>\n&rArr; Set &ldquo;Function name&rdquo;: Export-RDS-CloudWatch-Logs-To-S3<br>\n&rArr; Under &ldquo;Runtime&rdquo;, select Python 3.x.<br>\n&rArr; Under &ldquo;Permissions&rdquo;, select &ldquo;Use an existing role&rdquo; and select the IAM role that we created in the previous step.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/9-lambda-functions.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Configure Lambda Function\" src=\"\" alt=\"Configure Lambda Function\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/9-lambda-functions.png\"><\/a><\/p><p>&rArr; Click on the Create function and navigate to Code view and enter the following script:<\/p><pre>import boto3\nimport os\nimport datetime\n\nGROUP_NAME = os.environ['GROUP_NAME']\nDESTINATION_BUCKET = os.environ['DESTINATION_BUCKET']\nPREFIX = os.environ['PREFIX']\nNDAYS = os.environ['NDAYS']\nnDays = int(NDAYS)\n\ncurrentTime = datetime.datetime.now()\nStartDate = currentTime - datetime.timedelta(days=nDays)\nEndDate = currentTime - datetime.timedelta(days=nDays - 1)\n\nfromDate = int(StartDate.timestamp() * 1000)\ntoDate = int(EndDate.timestamp() * 1000)\n\nBUCKET_PREFIX = os.path.join(PREFIX, StartDate.strftime\n('%Y{0}%m{0}%d').format(os.path.sep))\n\ndef lambda_handler(event, context):\nclient = boto3.client('logs')\nclient.create_export_task(\nlogGroupName=GROUP_NAME,\nfromTime=fromDate,\nto=toDate,\ndestination=DESTINATION_BUCKET,\ndestinationPrefix=BUCKET_PREFIX\n)<\/pre><div class=\"extra-top-space\"><\/div><p>&rArr; Now, click on Configuration &rArr; Environment Variables.<br>\n&rArr; We need to create 4 variables:<br>\n&rArr; DESTINATION_BUCKET: &lt;Name of your S3 bucket&gt;<br>\n&rArr; GROUP_NAME: &lt;Log&rsquo;s group name that you are exporting&gt;<br>\n&rArr; NDAYS: 1<br>\n&rArr; PREFIX: exported-logs<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/10-lambda-functions.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Lambda Environment Variables\" src=\"\" alt=\"Lambda Environment Variables\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/10-lambda-functions.png\"><\/a><\/p><p>&rArr; Alright, you are set now. Save the function.<\/p><p>Now, let&rsquo;s set automation to run this lambda function.<\/p><p>&rArr; Now, visit your CloudWatch dashboard.<br>\n&rArr; Go to the Events &rArr; Rules.<br>\n&rArr; Click on Create Rule.<br>\n&rArr; Under Event Source, select Schedule.<br>\n&rArr; Set Fixed rate or cron expression to automatically run our lambda function.<br>\n&rArr; Under Target, select Lambda Function.<br>\n&rArr; Under Function, select the function we have created in the previous step.<\/p><p><a href=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/11-lambda-functions.png\" data-wpel-link=\"internal\"><img decoding=\"async\" data-attachment-id=\"16629\" data-permalink=\"https:\/\/www.accuwebhosting.com\/blog\/why-affiliate-marketing-does-not-work\/1-19\/\" data-orig-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-scaled.jpg\" data-orig-size=\"2560,1707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/01\/1-1024x683.jpg\" class=\"aligncenter wp-image-16629\" title=\"Cron to Execute Lambda Function\" src=\"\" alt=\"Cron to Execute Lambda Function\" width=\"1000\" height=\"667\" data-layzr=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/11-lambda-functions.png\"><\/a><\/p><p>This is all. Now, you have set up an environment to Export RDS logs to S3 automatically. You can retain the logs as long as you want. But, if you still face any issue, feel free to post a comment here. We would love to hear from you!!<\/p><div class=\"extra-top-space\"><\/div><div class=\"acc-blog-button\"><a href=\"https:\/\/www.accuwebtech.com\/hire-developers\/hire-aws-developer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" data-wpel-link=\"internal\"><span class=\" virtual-button\">Looking for AWS EXPERTS? CHECKOUT HERE<\/span><\/a><\/div><div class=\"extra-top-space\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;Before we learn how to automatically Export RDS Audit logs to S3, did you know AWS CloudWatch automatically stores RDS DB logs? Yes, they do, but, they only store the general logs for your DB instance. Now, what if you want to find a specific query or data from the log? Which user performed a particular query or from which IP Address? Who deleted certain records from your DB tables?Also, somehow you have managed to export all audit logs of your RDS instance to CloudWatch, which is great. But, do you know? CloudWatch will retain those logs for 30 days <\/p>\n","protected":false},"author":4,"featured_media":16805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[6],"tags":[],"class_list":["post-16792","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-tricks","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.8 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?<\/title>\n<meta name=\"description\" content=\"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?\" \/>\n<meta name=\"twitter:description\" content=\"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@accuwebhosting\" \/>\n<meta name=\"twitter:site\" content=\"@accuwebhosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jason-Pat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/\"},\"author\":{\"name\":\"Jason-Pat\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/fc39cf01f27372f01417fb50cc23605c\"},\"headline\":\"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?\",\"datePublished\":\"2022-03-05T07:59:10+00:00\",\"dateModified\":\"2025-09-15T11:16:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/\"},\"wordCount\":1040,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/rds-audit-logs-min.jpg\",\"articleSection\":[\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/\",\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/\",\"name\":\"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/rds-audit-logs-min.jpg\",\"datePublished\":\"2022-03-05T07:59:10+00:00\",\"dateModified\":\"2025-09-15T11:16:02+00:00\",\"description\":\"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/rds-audit-logs-min.jpg\",\"contentUrl\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/rds-audit-logs-min.jpg\",\"width\":735,\"height\":468},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/export-rds-logs-to-s3-bucket-automatically\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/\",\"name\":\"VPS Hosting Blog | Windows VPS &amp; Cloud Hosting | Dedicated Servers\",\"description\":\"AccuWeb Hosting\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#organization\",\"name\":\"AccuWeb Hosting\",\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/accu-logo-01-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/accu-logo-01-1.jpg\",\"width\":500,\"height\":600,\"caption\":\"AccuWeb Hosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/accuwebhosting\\\/\",\"https:\\\/\\\/x.com\\\/accuwebhosting\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/accuwebhosting\\\/posts\\\/?feedView=all\",\"https:\\\/\\\/www.pinterest.com\\\/accuwebhosting\\\/\",\"https:\\\/\\\/www.youtube.com\\\/accuwebhosting\"],\"description\":\"AccuWeb Hosting offers Web Hosting, VPS Hosting, Cloud Computing and bare metal Dedicated Servers.\",\"email\":\"jason@accuwebhosting.com\",\"telephone\":\"8777674678\",\"legalName\":\"Vaghasia Group, Inc. DBA: AccuWebHosting.com\",\"foundingDate\":\"2003-01-13\",\"duns\":\"140072005\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"51\",\"maxValue\":\"200\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/fc39cf01f27372f01417fb50cc23605c\",\"name\":\"Jason-Pat\",\"description\":\"Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights at AccuWebHosting blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, Windows and Linux hosting platforms.\",\"sameAs\":[\"https:\\\/\\\/www.accuwebhosting.com\",\"https:\\\/\\\/www.facebook.com\\\/accuwebhosting\",\"https:\\\/\\\/www.instagram.com\\\/accuwebhosting\\\/?hl=en\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/accuwebhosting\",\"https:\\\/\\\/x.com\\\/accuwebhosting\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Accuwebhosting\"],\"url\":\"https:\\\/\\\/www.accuwebhosting.com\\\/blog\\\/author\\\/jilesh-patadiya\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?","description":"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/","twitter_card":"summary_large_image","twitter_title":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?","twitter_description":"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.","twitter_image":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","twitter_creator":"@accuwebhosting","twitter_site":"@accuwebhosting","twitter_misc":{"Written by":"Jason-Pat","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#article","isPartOf":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/"},"author":{"name":"Jason-Pat","@id":"https:\/\/www.accuwebhosting.com\/blog\/#\/schema\/person\/fc39cf01f27372f01417fb50cc23605c"},"headline":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?","datePublished":"2022-03-05T07:59:10+00:00","dateModified":"2025-09-15T11:16:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/"},"wordCount":1040,"commentCount":2,"publisher":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#primaryimage"},"thumbnailUrl":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","articleSection":["Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/","url":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/","name":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?","isPartOf":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#primaryimage"},"image":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#primaryimage"},"thumbnailUrl":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","datePublished":"2022-03-05T07:59:10+00:00","dateModified":"2025-09-15T11:16:02+00:00","description":"Read our blog post about Exporting RDS Audit logs to S3 bucket automatically. Find other quality technical blogs on various AWS technologies.","breadcrumb":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#primaryimage","url":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","contentUrl":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","width":735,"height":468},{"@type":"BreadcrumbList","@id":"https:\/\/www.accuwebhosting.com\/blog\/export-rds-logs-to-s3-bucket-automatically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.accuwebhosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Automatically Export AWS RDS Audit Logs to S3 Bucket instance?"}]},{"@type":"WebSite","@id":"https:\/\/www.accuwebhosting.com\/blog\/#website","url":"https:\/\/www.accuwebhosting.com\/blog\/","name":"VPS Hosting Blog | Windows VPS &amp; Cloud Hosting | Dedicated Servers","description":"AccuWeb Hosting","publisher":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.accuwebhosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.accuwebhosting.com\/blog\/#organization","name":"AccuWeb Hosting","url":"https:\/\/www.accuwebhosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.accuwebhosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2024\/07\/accu-logo-01-1.jpg","contentUrl":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2024\/07\/accu-logo-01-1.jpg","width":500,"height":600,"caption":"AccuWeb Hosting"},"image":{"@id":"https:\/\/www.accuwebhosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/accuwebhosting\/","https:\/\/x.com\/accuwebhosting","https:\/\/www.linkedin.com\/company\/accuwebhosting\/posts\/?feedView=all","https:\/\/www.pinterest.com\/accuwebhosting\/","https:\/\/www.youtube.com\/accuwebhosting"],"description":"AccuWeb Hosting offers Web Hosting, VPS Hosting, Cloud Computing and bare metal Dedicated Servers.","email":"jason@accuwebhosting.com","telephone":"8777674678","legalName":"Vaghasia Group, Inc. DBA: AccuWebHosting.com","foundingDate":"2003-01-13","duns":"140072005","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"51","maxValue":"200"}},{"@type":"Person","@id":"https:\/\/www.accuwebhosting.com\/blog\/#\/schema\/person\/fc39cf01f27372f01417fb50cc23605c","name":"Jason-Pat","description":"Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights at AccuWebHosting blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, Windows and Linux hosting platforms.","sameAs":["https:\/\/www.accuwebhosting.com","https:\/\/www.facebook.com\/accuwebhosting","https:\/\/www.instagram.com\/accuwebhosting\/?hl=en","https:\/\/www.linkedin.com\/company\/accuwebhosting","https:\/\/x.com\/accuwebhosting","https:\/\/www.youtube.com\/c\/Accuwebhosting"],"url":"https:\/\/www.accuwebhosting.com\/blog\/author\/jilesh-patadiya\/"}]}},"jetpack_featured_media_url":"https:\/\/www.accuwebhosting.com\/blog\/wp-content\/uploads\/2022\/03\/rds-audit-logs-min.jpg","jetpack_shortlink":"https:\/\/wp.me\/p4jEcT-4mQ","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/16792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=16792"}],"version-history":[{"count":26,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/16792\/revisions"}],"predecessor-version":[{"id":26269,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/16792\/revisions\/26269"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/media\/16805"}],"wp:attachment":[{"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=16792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=16792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.accuwebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=16792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}