Skip to content
AWS Lambda function for deleting PostgreSQL databases with credentials in Secrets Manager
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.editorconfig
.gitignore
.markdownlint.yml
.travis.yml
LICENSE
README.md
go.mod
go.sum
main.go

README.md

gordsplus-deletelambda

Build Status Go Report Card MIT

A Golang AWS Lambda function for deleting PostgreSQL databases with credentials in Secrets Manager, as-deployed by github.com/cariad/gordsplus-createlambda.

Introduction

This Lambda function essentially wraps the Undeploy function of github.com/cariad/gordsplus.

Payload

  • secretArn is the ARN of the Secret to delete.

Note that the database is looked-up automatically and does not need to be included in the payload.

For example:

{
  "secretArn": "arn:aws:secretsmanager:eu-west-2:555000000000:secret:mycredentials-UJ2Na3"
}

Response

The function will not return any response content.

Permissions

The role which this Lambda function assumes will require:

  • rds:DeleteDBInstance
  • secretsmanager:DeleteSecret
  • secretsmanager:GetSecretValue

The KMS key which encrypts the value will need to grant the following to the role:

  • kms:Decrypt

Acknowledgements

This project uses the following packages:

Licence, credit & sponsorship

This project is published under the MIT Licence.

You don't owe me anything in return, but as an indie freelance coder there are two things I'd appreciate:

  • Credit. If your app or documentation has a credits page, please consider mentioning the projects you use.
  • Cash. If you want and are able to support future development, please consider becoming a patron or buying me a coffee. Thank you!
You can’t perform that action at this time.