AWS Lambda Function to copy MySQL Query Logs to S3
Pull request Compare This branch is 2 commits ahead, 9 commits behind ryanholland:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rdslogs @ 7b3ae2e
.gitignore move lambda function as submodule Nov 2, 2016
.gitmodules move lambda function as submodule Nov 2, 2016
.npmignore
README.md
event.json
serverless.yml move lambda function as submodule Nov 2, 2016

README.md

Serverless Framework AWS Lambda function to export Amazon RDS MySQL Query Logs to S3

Serverless Framework for AWS Lambda function to export Amazon RDS MySQL Query Logs to S3 .

Requirments

  • Serverless Framework v1.0.0 or later

Setup

clone it

$ git clone git@github.com:hideokamoto/rdslogs_to_s3.git

Set ENV Parameter

$ export FUNC_PREFIX=sample

configure Lambda function

set following parameters in Lambda function(rdslogs/rds_mysql_to_s3.py)

S3BCUKET='rds-mysql-logs-sample'
S3PREFIX='[Prefix to use within the specified bucket]/'
RDSINSANCE='[RDS DB Instance Name]'
LOGNAME='general/mysql-general'
LASTRECIEVED='lastWrittenMarker'
REGION='[RegionName]'

S3BCUKET should be rds-mysql-logs- + FUNC_PREFIX.

Deploy

$ sls deploy -r [RegionName]