Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconaurora
file-type-iconefs
file-type-iconlambda-cleanup-snapshots
file-type-iconcleanup-rds-snapshots
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconlambda-copy-shared-snapshot
file-type-iconlambda-create-snapshot
file-type-iconlambda-share-snapshot
file-type-iconrds
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.adoc

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconmodules
file-type-iconaurora
file-type-iconefs
file-type-iconlambda-cleanup-snapshots
file-type-iconcleanup-rds-snapshots
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconlambda-copy-shared-snapshot
file-type-iconlambda-create-snapshot
file-type-iconlambda-share-snapshot
file-type-iconrds
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.adoc
RDS

RDS

Terraform code and scripts for deploying data-storage resources (e.g. databases, cache) in AWS

Code Preview

Preview the Code

mobile file icon

README.md

down

Delete Snapshots Lambda Module

This module creates an AWS Lambda function that runs periodically and deletes old snapshots of an Amazon Relational Database (RDS) database. The module allows you to specify the maximum number of snapshots you want to keep and any time that number of snapshots is exceeded, it will delete the oldest snapshots.

Note that to use this module, you must have access to the Gruntwork Continuous Delivery Infrastructure Package (module-ci). If you need access, email support@gruntwork.io.

How do you use this module?

See the lambda-rds-snapshot example for sample code.

How do you configure this module?

This module allows you to configure a number of parameters, such as which database to backup, how often to run the backups, what account to share the backups with, and more. For a list of all available variables and their descriptions, see vars.tf.

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?