AWS Lambda function which mysqldumps an RDS to S3
install node-lambda
npm install -g node-lambda
add configuration settings to env file.
Probably needs a lambda layer to run the aws command. mysqldump bin is included.
cp example.env .env
node-lambda deploy
also add your environment variables in the lambda management console:
EXPORT_DB_HOST
the RDS endpointEXPORT_DB_NAME
the name of the database to dumpEXPORT_DB_USERNAME
the usernameEXPORT_DB_PASSWORD
the passwordEXPORT_S3_PATH
the name of the destination S3 bucket